diff --git a/.github/workflows/openapi-validation.yml b/.github/workflows/openapi-validation.yml new file mode 100644 index 00000000..312daa04 --- /dev/null +++ b/.github/workflows/openapi-validation.yml @@ -0,0 +1,33 @@ +name: OpenAPI Validation + +on: + pull_request: + paths: + - 'api/meta/build/meta.yaml' + - 'api/registry/build/registry.yaml' + - 'api/transaction/build/transaction.yaml' + +jobs: + validate-openapi: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Install OpenAPI Validator + run: npm install -g @redocly/openapi-cli + + - name: Validate meta.yaml + run: openapi lint api/meta/build/meta.yaml + + - name: Validate registry.yaml + run: openapi lint api/registry/build/registry.yaml + + - name: Validate transaction.yaml + run: openapi lint api/transaction/build/transaction.yaml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c7f66df..96975609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -182,8 +182,8 @@ Schedule schema object was added to Time - **/get_feedback_categories** : Returns the allowed categories that can have a feedback - **/get_feedback_form** : Request the BPP to get a feedback form - **/feedback_form** : Get a feedback form from the BPP. Callback response of /get_feedback_form -- **/rating** : Uses Rating object as message -- **/on_rating** : Used RatingAck as message +- **rating** : Uses Rating object as message +- **on_rating** : Used RatingAck as message **Made all the meta APIs async. Created the following new meta BAP APIs :** - POST /cancellation_reasons @@ -245,4 +245,7 @@ The same was added to the following : ### December 22, 2021 -**Added document object array in order** \ No newline at end of file +**Added document object array in order** + +### April 25, 2025 +- Updated `/track` API to support tracking at the fulfillment level by adding an optional `fulfillment_id` property. \ No newline at end of file diff --git a/api/transaction/components/io/Track.yaml b/api/transaction/components/io/Track.yaml index e2d3052f..8ae15a5e 100644 --- a/api/transaction/components/io/Track.yaml +++ b/api/transaction/components/io/Track.yaml @@ -14,6 +14,8 @@ properties: properties: order_id: $ref: "../../../../schema/Order.yaml#/properties/id" + fulfillment_id: + $ref: "../../../../schema/Fulfillment.yaml#/properties/id" callback_url: type: string format: uri diff --git a/schema/Item.yaml b/schema/Item.yaml index 0ac270b3..41f29c37 100644 --- a/schema/Item.yaml +++ b/schema/Item.yaml @@ -67,15 +67,26 @@ properties: items: $ref: "./RefundTerm.yaml" replacement_terms: - description: Terms that are applicable be met when this item is replaced + description: Terms that are applicable when this item is replaced type: array items: $ref: "./ReplacementTerm.yaml" + properties: + replacement_eligible: + description: Indicates if the item is eligible for replacement + type: boolean + fulfillment_managed_by: + description: Entity managing the fulfillment of the replacement + type: string return_terms: description: Terms that are applicable when this item is returned type: array items: $ref: "./ReturnTerm.yaml" + properties: + return_eligible: + description: Indicates if the item is eligible for return + type: boolean xinput: description: Additional input required from the customer to purchase / avail this item allOf: diff --git a/schema/Order.yaml b/schema/Order.yaml index 3253c4cf..569d81aa 100644 --- a/schema/Order.yaml +++ b/schema/Order.yaml @@ -100,4 +100,8 @@ properties: tags: type: array items: - $ref: "./TagGroup.yaml" \ No newline at end of file + $ref: "./TagGroup.yaml" + state: + description: The current state of the order. This can represent various stages like 'Pending', 'Processing', 'Shipped', etc., as defined by the network policy. + allOf: + - $ref: "./State.yaml" \ No newline at end of file