Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that orderProposalVersion is of form {orderId}/versions/{versionUuid} #449

Open
lukehesluke opened this issue Mar 25, 2024 · 0 comments

Comments

@lukehesluke
Copy link
Contributor

lukehesluke commented Mar 25, 2024

See the spec for Order: https://openactive.io/open-booking-api/EditorsDraft/1.0CR3/#schema-order — specifically orderProposalVersion:

This URL must be constructed by appending /versions/{versionUUID} to the @id of the OrderProposal, where {versionUUID} is replaced by the OrderProposal Version UUID.

If you load Validator with an OrderProposal example e.g. https://validator.openactive.io/?url=https%3A%2F%2Fopenactive.io%2Fdata-models%2Fversions%2F2.x%2Fexamples%2Fbooking_spec_examples%2Fp_response_example_1.json&version=2.x&validationMode=PResponse and mess up the orderProposalVersion URL (e.g. change /versions/ to /v/), then Validator will not fail it.

For this reason, Test Suite has custom tests for this (SEE packages/openactive-integration-tests/test/features/approval/minimal-proposal/implemented/accept-proposal-book-test.js & others), but it should be part of Validator.


If done, could you also remove the custom check from Test Suite — SEE:

  • packages/openactive-integration-tests/test/features/approval/minimal-proposal/implemented/accept-proposal-book-test.js
  • packages/openactive-integration-tests/test/features/approval/minimal-proposal/implemented/customer-reject-proposal-test.js
  • packages/openactive-integration-tests/test/features/approval/minimal-proposal/implemented/not-accept-proposal-book-test.js
  • packages/openactive-integration-tests/test/features/approval/minimal-proposal/implemented/seller-reject-proposal-test.js
  • packages/openactive-integration-tests/test/features/approval/proposal-amendment/implemented/proposal-amendment-book-test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 💡Ideas
Development

No branches or pull requests

1 participant