Skip to content

Commit

Permalink
docs: Document testOpenBookingFlow in Create Opportunity header text (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
lukehesluke authored Mar 27, 2024
1 parent e90275f commit df68f1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 8 additions & 2 deletions header.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,14 @@ This endpoint creates an opportunity in the Booking System, that matches the spe

The endpoint is called (potentially multiple times) before each individual test starts executing, when the [OpenActive Test Suite](https://github.com/openactive/openactive-test-suite/) is run in "Controlled" test mode.

The endpoint must accept a [bookable opportunity type](https://www.openactive.io/open-booking-api/EditorsDraft/#definition-of-a-bookable-opportunity-and-offer-pair), which includes a specific `test:TestOpportunityCriteriaEnumeration` to which the newly created opportunity must conform, and the appropriate `@type` of `superEvent` or `facilityUse` to disambiguate the type of opportunity to be created. It must also include an `organizer` or `provider` `@id` to specify the Seller within which the opportunity should be created.
The endpoint must accept a [bookable opportunity type](https://www.openactive.io/open-booking-api/EditorsDraft/#definition-of-a-bookable-opportunity-and-offer-pair), which includes:

The Booking System must create an opportunity of the type specified in `@type` (taking into account `@type` of `superEvent` or `facilityUse`) matching the criteria specified by `test:TestOpportunityCriteriaEnumeration`, within the specified notional "Test Dataset" defined by the `testDatasetIdentifier` within the path.
* A specific `test:TestOpportunityCriteriaEnumeration` (criteria) to which the newly created opportunity must conform.
* A `test:TestOpenBookingFlowEnumeration` describing which [booking flow](https://openactive.io/open-booking-api/EditorsDraft/1.0CR3/#booking-flows) the opportunity must support.
* The appropriate `@type` of `superEvent` or `facilityUse` to disambiguate the type of opportunity to be created.
* An `organizer` or `provider` `@id` to specify the Seller within which the opportunity should be created.

The Booking System must create an opportunity of the type specified in `@type` (taking also into account `@type` of `superEvent` or `facilityUse`) that matches all of the defined constraints (e.g. the criteria), within the specified notional "Test Dataset" defined by the `testDatasetIdentifier` within the path.

##### Example Request

Expand All @@ -88,6 +93,7 @@ Accept: application/vnd.openactive.booking+json; version=1
"@id": "https://id.booking-system.example.com/organizer/3"
}
},
"test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingSimpleFlow",
"test:testOpportunityCriteria": "https://openactive.io/test-interface#TestOpportunityBookable"
}
```
Expand Down
5 changes: 2 additions & 3 deletions test-interface.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@id": "test:testOpenBookingFlow",
"@type": "Property",
"label": "testOpenBookingFlow",
"comment": "",
"comment": "The [open booking flow](https://openactive.io/open-booking-api/EditorsDraft/1.0CR3/#booking-flows) that a created [Opportunity and Offer pair](https://openactive.io/open-booking-api/EditorsDraft/1.0CR3/#definition-of-a-bookable-opportunity-and-offer-pair) should support.",
"domainIncludes": [
"schema:Event"
],
Expand All @@ -22,7 +22,7 @@
"@id": "test:TestOpenBookingFlowEnumeration",
"@type": "Class",
"label": "TestOpenBookingFlowEnumeration",
"comment": "An enumeration of open booking flows that an opportunity can be booked with.",
"comment": "An enumeration of [open booking flow](https://openactive.io/open-booking-api/EditorsDraft/1.0CR3/#booking-flows) that an [Opportunity and Offer pair](https://openactive.io/open-booking-api/EditorsDraft/1.0CR3/#definition-of-a-bookable-opportunity-and-offer-pair) can be booked with.",
"subClassOf": [
"schema:Enumeration"
]
Expand All @@ -39,7 +39,6 @@
"label": "OpenBookingApprovalFlow",
"comment": "[Booking Flow with Approval](https://openactive.io/open-booking-api/EditorsDraft/#booking-flow-with-approval): Booking flow that requires Seller approval before booking"
},

{
"@id": "test:testOpportunityCriteria",
"@type": "Property",
Expand Down

0 comments on commit df68f1a

Please sign in to comment.