Skip to content

Commit dc4514c

Browse files
Move facilityType out of beta (#58)
1 parent 4bf211e commit dc4514c

2 files changed

Lines changed: 38 additions & 24 deletions

File tree

OpenActive.NET/enums/PropertyEnumeration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public enum PropertyEnumeration
6161
EntitlementType,
6262
[EnumMember(Value = "https://openactive.io/evidenceRequestAction")]
6363
EvidenceRequestAction,
64+
[EnumMember(Value = "https://openactive.io/facilityType")]
65+
FacilityType,
6466
[EnumMember(Value = "https://openactive.io/facilityUse")]
6567
FacilityUse,
6668
[EnumMember(Value = "https://openactive.io/genderRestriction")]

OpenActive.NET/models/FacilityUse.cs

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public override string ToString()
112112
public virtual List<Concept> AccessibilitySupport { get; set; }
113113

114114
/// <summary>
115+
/// [DEPRECATED: Use `facilityType` instead of `activity` within `FacilityUse` and `IndividualFacilityUse`, as the `facilityType` controlled vocabulary has been designed specifically for facilities.]
115116
/// Specifies the physical activity or activities that will take place during a facility use.
116117
/// </summary>
117118
/// <example>
@@ -128,6 +129,7 @@ public override string ToString()
128129
/// </example>
129130
[DataMember(Name = "activity", EmitDefaultValue = false, Order = 12)]
130131
[JsonConverter(typeof(ValuesConverter))]
132+
[Obsolete("Use `facilityType` instead of `activity` within `FacilityUse` and `IndividualFacilityUse`, as the `facilityType` controlled vocabulary has been designed specifically for facilities.", false)]
131133
public virtual List<Concept> Activity { get; set; }
132134

133135
/// <summary>
@@ -214,10 +216,30 @@ public override string ToString()
214216
[JsonConverter(typeof(ValuesConverter))]
215217
public new virtual List<Slot> Event { get; set; }
216218

219+
/// <summary>
220+
/// Specifies the types of facility being described.
221+
/// NOTE: this property has been added to tooling and documentation ahead of inclusion in the next point release of the OpenActive Modelling Opportunity Data specification, as agreed on [the W3C call 2021-06-02](https://github.com/openactive/facility-types/issues/1#issuecomment-853759213).
222+
/// </summary>
223+
/// <example>
224+
/// <code>
225+
/// "facilityType": [
226+
/// {
227+
/// "@type": "Concept",
228+
/// "@id": "https://openactive.io/facility-types#bba8ae59-d152-40bc-85cc-88c5375696d4",
229+
/// "prefLabel": "Tennis Court",
230+
/// "inScheme": "https://openactive.io/facility-types"
231+
/// }
232+
/// ]
233+
/// </code>
234+
/// </example>
235+
[DataMember(Name = "facilityType", EmitDefaultValue = false, Order = 18)]
236+
[JsonConverter(typeof(ValuesConverter))]
237+
public virtual List<Concept> FacilityType { get; set; }
238+
217239
/// <summary>
218240
/// The times the facility use is available
219241
/// </summary>
220-
[DataMember(Name = "hoursAvailable", EmitDefaultValue = false, Order = 18)]
242+
[DataMember(Name = "hoursAvailable", EmitDefaultValue = false, Order = 19)]
221243
[JsonConverter(typeof(ValuesConverter))]
222244
public new virtual List<OpeningHoursSpecification> HoursAvailable { get; set; }
223245

@@ -235,7 +257,7 @@ public override string ToString()
235257
/// ]
236258
/// </code>
237259
/// </example>
238-
[DataMember(Name = "image", EmitDefaultValue = false, Order = 19)]
260+
[DataMember(Name = "image", EmitDefaultValue = false, Order = 20)]
239261
[JsonConverter(typeof(ValuesConverter))]
240262
public new virtual List<ImageObject> Image { get; set; }
241263

@@ -247,13 +269,13 @@ public override string ToString()
247269
/// "individualFacilityUse": [
248270
/// {
249271
/// "@type": "IndividualFacilityUse",
250-
/// "@id": "http://www.example.org/facility-uses/1",
272+
/// "@id": "http://www.example.org/facility-uses/1/individual-facility-uses/1",
251273
/// "name": "Tennis Court 1"
252274
/// }
253275
/// ]
254276
/// </code>
255277
/// </example>
256-
[DataMember(Name = "individualFacilityUse", EmitDefaultValue = false, Order = 20)]
278+
[DataMember(Name = "individualFacilityUse", EmitDefaultValue = false, Order = 21)]
257279
[JsonConverter(typeof(ValuesConverter))]
258280
public virtual List<IndividualFacilityUse> IndividualFacilityUse { get; set; }
259281

@@ -266,7 +288,7 @@ public override string ToString()
266288
/// "isOpenBookingWithCustomerAccountAllowed": "true"
267289
/// </code>
268290
/// </example>
269-
[DataMember(Name = "isOpenBookingWithCustomerAccountAllowed", EmitDefaultValue = false, Order = 21)]
291+
[DataMember(Name = "isOpenBookingWithCustomerAccountAllowed", EmitDefaultValue = false, Order = 22)]
270292
[JsonConverter(typeof(ValuesConverter))]
271293
public virtual bool? IsOpenBookingWithCustomerAccountAllowed { get; set; }
272294

@@ -297,7 +319,7 @@ public override string ToString()
297319
/// }
298320
/// </code>
299321
/// </example>
300-
[DataMember(Name = "location", EmitDefaultValue = false, Order = 22)]
322+
[DataMember(Name = "location", EmitDefaultValue = false, Order = 23)]
301323
[JsonConverter(typeof(ValuesConverter))]
302324
public new virtual Place Location { get; set; }
303325

@@ -316,7 +338,7 @@ public override string ToString()
316338
/// }
317339
/// </code>
318340
/// </example>
319-
[DataMember(Name = "offers", EmitDefaultValue = false, Order = 23)]
341+
[DataMember(Name = "offers", EmitDefaultValue = false, Order = 24)]
320342
[JsonConverter(typeof(ValuesConverter))]
321343
public new virtual List<Offer> Offers { get; set; }
322344

@@ -332,7 +354,7 @@ public override string ToString()
332354
/// }
333355
/// </code>
334356
/// </example>
335-
[DataMember(Name = "provider", EmitDefaultValue = false, Order = 24)]
357+
[DataMember(Name = "provider", EmitDefaultValue = false, Order = 25)]
336358
[JsonConverter(typeof(ValuesConverter))]
337359
public new virtual Organization Provider { get; set; }
338360

@@ -344,7 +366,7 @@ public override string ToString()
344366
/// "url": "https://example.com/facility-use/1234"
345367
/// </code>
346368
/// </example>
347-
[DataMember(Name = "url", EmitDefaultValue = false, Order = 25)]
369+
[DataMember(Name = "url", EmitDefaultValue = false, Order = 26)]
348370
[JsonConverter(typeof(ValuesConverter))]
349371
public new virtual Uri Url { get; set; }
350372

@@ -354,7 +376,7 @@ public override string ToString()
354376
///
355377
/// If you are using this property, please join the discussion at proposal [#276](https://github.com/openactive/modelling-opportunity-data/issues/276).
356378
/// </summary>
357-
[DataMember(Name = "beta:formattedDescription", EmitDefaultValue = false, Order = 1026)]
379+
[DataMember(Name = "beta:formattedDescription", EmitDefaultValue = false, Order = 1027)]
358380
[JsonConverter(typeof(ValuesConverter))]
359381
public virtual string FormattedDescription { get; set; }
360382

@@ -364,7 +386,7 @@ public override string ToString()
364386
///
365387
/// If you are using this property, please join the discussion at proposal [#166](https://github.com/openactive/modelling-opportunity-data/issues/166).
366388
/// </summary>
367-
[DataMember(Name = "beta:isWheelchairAccessible", EmitDefaultValue = false, Order = 1027)]
389+
[DataMember(Name = "beta:isWheelchairAccessible", EmitDefaultValue = false, Order = 1028)]
368390
[JsonConverter(typeof(ValuesConverter))]
369391
public virtual bool? IsWheelchairAccessible { get; set; }
370392

@@ -374,7 +396,7 @@ public override string ToString()
374396
///
375397
/// If you are using this property, please join the discussion at proposal [#88](https://github.com/openactive/modelling-opportunity-data/issues/88).
376398
/// </summary>
377-
[DataMember(Name = "beta:video", EmitDefaultValue = false, Order = 1028)]
399+
[DataMember(Name = "beta:video", EmitDefaultValue = false, Order = 1029)]
378400
[JsonConverter(typeof(ValuesConverter))]
379401
public virtual List<VideoObject> Video { get; set; }
380402

@@ -384,7 +406,7 @@ public override string ToString()
384406
///
385407
/// If you are using this property, please join the discussion at proposal [#110](https://github.com/openactive/modelling-opportunity-data/issues/110).
386408
/// </summary>
387-
[DataMember(Name = "beta:sportsActivityLocation", EmitDefaultValue = false, Order = 1029)]
409+
[DataMember(Name = "beta:sportsActivityLocation", EmitDefaultValue = false, Order = 1030)]
388410
[JsonConverter(typeof(ValuesConverter))]
389411
public virtual List<Schema.NET.SportsActivityLocation> SportsActivityLocation { get; set; }
390412

@@ -394,20 +416,10 @@ public override string ToString()
394416
///
395417
/// If you are using this property, please join the discussion at proposal [#204](https://github.com/openactive/modelling-opportunity-data/issues/204).
396418
/// </summary>
397-
[DataMember(Name = "beta:offerValidityPeriod", EmitDefaultValue = false, Order = 1030)]
419+
[DataMember(Name = "beta:offerValidityPeriod", EmitDefaultValue = false, Order = 1031)]
398420
[JsonConverter(typeof(OpenActiveTimeSpanToISO8601DurationValuesConverter))]
399421
public virtual TimeSpan? OfferValidityPeriod { get; set; }
400422

401-
/// <summary>
402-
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
403-
/// The type of facility in use. See https://openactive.io/facility-types/.
404-
///
405-
/// If you are using this property, please join the discussion at proposal [#1](https://github.com/openactive/facility-types/issues/1).
406-
/// </summary>
407-
[DataMember(Name = "beta:facilityType", EmitDefaultValue = false, Order = 1031)]
408-
[JsonConverter(typeof(ValuesConverter))]
409-
public virtual List<Concept> FacilityType { get; set; }
410-
411423
/// <summary>
412424
/// [NOTICE: This is a beta property, and is highly likely to change in future versions of this library.]
413425
/// Whether the event or facility is indoor or outdoor.

0 commit comments

Comments
 (0)