Skip to content

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

Description

@lukehesluke

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions