@openactive/data-models
Version:
Data models used to drive that OpenActive validator, developer documentation, and model libraries
132 lines (131 loc) • 3.63 kB
JSON
{
"type": "IndividualFacilityUse",
"hasId": true,
"subClassOf": "#FacilityUse",
"sampleId": "https://api.example.com/individual-facility-uses/12345",
"requiredFields": [
"type",
"id",
"url",
"name",
"location",
"provider"
],
"requiredOptions": [
{
"description": [
"Support for the `facilityType` 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). On this basis of this discussion, following the next point release, only `facilityType` will be required."
],
"options": [
"facilityType",
"activity"
]
}
],
"recommendedFields": [
"description",
"image",
"hoursAvailable"
],
"validationMode": {
"C1Response": "response",
"C1ResponseOrderItemError": "response",
"C2Response": "response",
"C2ResponseOrderItemError": "response",
"PResponse": "response",
"PResponseOrderItemError": "response",
"BResponse": "response",
"BResponseOrderItemError": "response",
"OrderStatus": "response",
"TestInterface": "testInterface"
},
"imperativeConfiguration": {
"testInterface": {
"requiredFields": [
"type"
],
"recommendedFields": [],
"shallNotInclude": []
},
"response": {
"requiredFields": [
"type",
"name",
"aggregateFacilityUse"
],
"shallNotInclude": [
"offers",
"event",
"provider"
],
"shallNotBeReferencedFields": [
"aggregateFacilityUse"
]
}
},
"notInSpec": [
"individualFacilityUse"
],
"inSpec": [
"type",
"id",
"url",
"identifier",
"individualFacilityUse",
"name",
"description",
"image",
"facilityType",
"activity",
"location",
"event",
"offers",
"hoursAvailable",
"aggregateFacilityUse",
"provider",
"accessibilityInformation",
"accessibilitySupport",
"category",
"attendeeInstructions",
"additionalAdmissionRestriction",
"customerAccountBookingRestriction",
"isOpenBookingWithCustomerAccountAllowed"
],
"fields": {
"type": {
"fieldName": "type",
"requiredType": "https://schema.org/Text",
"requiredContent": "IndividualFacilityUse"
},
"aggregateFacilityUse": {
"fieldName": "aggregateFacilityUse",
"sameAs": "https://openactive.io/aggregateFacilityUse",
"model": "#FacilityUse",
"description": [
"Inverse of the oa:individualFacilityUse property. Relates an oa:IndividualFacilityUse (e.g. an opportunity to play tennis on a specific court) to a oa:FacilityUse (e.g. an opportunity to play tennis at a specific location)."
],
"inheritsFrom": {
"exclude": ["id", "identifier", "aggregateFacilityUse", "name"]
}
},
"event": {
"fieldName": "event",
"sameAs": "https://schema.org/event",
"model": "ArrayOf#Slot",
"description": [
"An array of slots of availability of this IndividualFacilityUse."
],
"example": [
{
"@type": "Slot",
"@id": "http://www.example.org/api/individual-facility-uses/432#/event/2018-03-01T10:00:00Z",
"startDate": "2018-03-01T11:00:00Z",
"endDate": "2018-03-01T11:30:00Z",
"duration": "PT30M",
"remainingUses": 0,
"maximumUses": 1
}
]
}
}
}