@openactive/data-models
Version:
Data models used to drive that OpenActive validator, developer documentation, and model libraries
42 lines (41 loc) • 1.96 kB
JSON
{
"type": "OpportunityHasInsufficientCapacityError",
"subClassOf": "#OpenBookingError",
"description": {
"sections": [
{
"title": "Error Use Case",
"paragraphs": [
"There are not enough available spaces in the Opportunity contained in the `orderedItem` property of the `OrderItem` to fulfil the number of repeated `OrderItem`s. If the `OrderItem` is repeated (for multiple attendees) this error MUST only be included in the API response against the `OrderItem`s which are in excess of the capacity - for example in an Opportunity with a `remainingAttendeeCapacity` of 2 and with 5 `OrderItem`s related to it, this error would only be emitted against 3 of the `OrderItem`s."
]
}
]
},
"fields": {
"type": {
"fieldName": "type",
"requiredContent": "OpportunityHasInsufficientCapacityError",
"requiredType": "https://schema.org/Text"
},
"name": {
"description": [
"A short, human-readable summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization."
],
"example": "There are not enough available spaces in the Opportunity contained in the 'orderedItem' property of the 'OrderItem' to fulfil the number of repeated 'OrderItem's.",
"defaultContent": "There are not enough available spaces in the Opportunity contained in the 'orderedItem' property of the 'OrderItem' to fulfil the number of repeated 'OrderItem's.",
"fieldName": "name",
"requiredType": "https://schema.org/Text",
"sameAs": "https://schema.org/name"
},
"statusCode": {
"fieldName": "statusCode",
"sameAs": "https://openactive.io/statusCode",
"requiredType": "https://schema.org/Integer",
"requiredContent": 409,
"defaultContent": 409,
"description": [
"An integer representing the HTTP status code."
]
}
}
}