From 66aba8c39873a8c5d833151d03265d2e871468e6 Mon Sep 17 00:00:00 2001 From: Rashap Goyal <143923646+rashap224@users.noreply.github.com> Date: Fri, 25 Apr 2025 07:18:46 +0000 Subject: [PATCH 1/4] Add state property to Order schema --- schema/Order.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 From 61671a2df384f0c4465e989325cd28b8737f6241 Mon Sep 17 00:00:00 2001 From: Rashap Goyal <143923646+rashap224@users.noreply.github.com> Date: Fri, 25 Apr 2025 07:48:05 +0000 Subject: [PATCH 2/4] feat: Add fulfillment-level tracking support to /track API --- CHANGELOG.md | 9 ++++++--- api/transaction/components/io/Track.yaml | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) 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 From 5ee5fbecad2c96c1d3b8066463eed1d2d557904c Mon Sep 17 00:00:00 2001 From: Rashap Goyal <143923646+rashap224@users.noreply.github.com> Date: Fri, 25 Apr 2025 08:04:31 +0000 Subject: [PATCH 3/4] Updated Item schema: moved return_eligible and replacement_eligible, added fulfillment_managed_by --- schema/Item.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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: From 49ae33c79c56cd6b73602abf9d3d27d2b39e0275 Mon Sep 17 00:00:00 2001 From: Rashap Goyal <143923646+rashap224@users.noreply.github.com> Date: Fri, 25 Apr 2025 09:32:07 +0000 Subject: [PATCH 4/4] Add GitHub Actions workflow for OpenAPI syntax validation --- .github/workflows/openapi-validation.yml | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/openapi-validation.yml 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