From 63729674c1219d1515c3e2a5bdbb9770ad4c7934 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 24 Jan 2024 19:31:11 +0530 Subject: [PATCH 01/12] adding github action for core spec --- .../workflows/Beckn-Core-Spec-Validator.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/Beckn-Core-Spec-Validator.yml diff --git a/.github/workflows/Beckn-Core-Spec-Validator.yml b/.github/workflows/Beckn-Core-Spec-Validator.yml new file mode 100644 index 00000000..6aef2978 --- /dev/null +++ b/.github/workflows/Beckn-Core-Spec-Validator.yml @@ -0,0 +1,29 @@ +name: Validate Beckn core spec meta, registry and transaction Schema against OpenAPI Specification + +on: + pull_request: + branches: + - main + push: + branches: + - draft + +jobs: + validate_beckn_schema: + name: Validate Beckn Schemas + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Install Node + uses: actions/setup-node@v4 + with: + node-version: 16 + - name: install Beckn validator tool for spec + run: npm install -g beckn-spec-validator + - name: Validate meta file + run: beckn-spec-validator -b api/meta/build/meta.yaml -v false + - name: Validate registry file + run: beckn-spec-validator -b api/registry/build/registry.yaml -v false + - name: Validate transaction file + run: beckn-spec-validator -b api/transaction/build/transaction.yaml -v false \ No newline at end of file From 094a6702401d11972dcccc6f351893f22d59dbd4 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 17:55:13 +0530 Subject: [PATCH 02/12] testing a new version of github action --- ...ication-openapi-validator-redocly.yaml.yml | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml diff --git a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml new file mode 100644 index 00000000..a4cb2cb9 --- /dev/null +++ b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml @@ -0,0 +1,42 @@ +name: CI-RK + +on: + # change this to the branch you want to test this workflow on + push: + branches: + - "master" + pull_request: + branches: + - "master" + paths: + - "api/meta/build/meta.yaml" + - "api/registry/build/registry.yaml" + - "api/transaction/build/transaction.yaml" + +jobs: + validate: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: "14" + + - name: Install openapi-cli + run: npm install -g @redocly/cli + + - name: Validate meta.yaml + if: exists('api/meta/build/meta.yaml') + run: openapi lint api/meta/build/meta.yaml + + - name: Validate registry.yaml + if: exists('api/registry/build/registry.yaml') + run: openapi lint api/registry/build/registry.yaml + + - name: Validate transaction.yaml + if: exists('api/transaction/build/transaction.yaml') + run: openapi lint api/transaction/build/transaction.yaml \ No newline at end of file From 397a86c9cb057006a8fffe87b9796303ac30d69b Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 17:58:05 +0530 Subject: [PATCH 03/12] adding draft as a tracking branch --- .../protocl-specification-openapi-validator-redocly.yaml.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml index a4cb2cb9..f28a1895 100644 --- a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml +++ b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml @@ -5,9 +5,11 @@ on: push: branches: - "master" + - "draft" pull_request: branches: - "master" + - "draft" paths: - "api/meta/build/meta.yaml" - "api/registry/build/registry.yaml" From ebf3b77effe957d0a91834b945a4336b1de31fb5 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 17:59:40 +0530 Subject: [PATCH 04/12] adding current branch --- .../protocl-specification-openapi-validator-redocly.yaml.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml index f28a1895..7f84d88c 100644 --- a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml +++ b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml @@ -6,10 +6,12 @@ on: branches: - "master" - "draft" + - "github-action" pull_request: branches: - "master" - "draft" + - "github-action" paths: - "api/meta/build/meta.yaml" - "api/registry/build/registry.yaml" From add4219c13ff1a955955879b98e3da65062e88ec Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 18:01:29 +0530 Subject: [PATCH 05/12] adding a harmless space in the meta.yaml --- api/meta/build/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/meta/build/meta.yaml b/api/meta/build/meta.yaml index 72c597c5..f2e9f86c 100644 --- a/api/meta/build/meta.yaml +++ b/api/meta/build/meta.yaml @@ -3,7 +3,7 @@ info: title: Beckn Protocol Meta API description: This document contains all the meta API endpoints that are implemented by the network participants. The information returned from these endpoints typically contain cacheable information. version: 1.0.0 -security: +security: - SubscriberAuth: [] paths: /get_cancellation_reasons: From ca75252e7caebecb4fa18050331bc16742426592 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 18:07:27 +0530 Subject: [PATCH 06/12] remove exists() --- .../protocl-specification-openapi-validator-redocly.yaml.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml index 7f84d88c..d7a545a7 100644 --- a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml +++ b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml @@ -34,13 +34,10 @@ jobs: run: npm install -g @redocly/cli - name: Validate meta.yaml - if: exists('api/meta/build/meta.yaml') run: openapi lint api/meta/build/meta.yaml - name: Validate registry.yaml - if: exists('api/registry/build/registry.yaml') run: openapi lint api/registry/build/registry.yaml - name: Validate transaction.yaml - if: exists('api/transaction/build/transaction.yaml') run: openapi lint api/transaction/build/transaction.yaml \ No newline at end of file From 10448fcbd415bd12545ebf925bc8a6206b3d53c0 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 19:17:28 +0530 Subject: [PATCH 07/12] adding new action --- .github/workflows/thiyagu.yaml | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/thiyagu.yaml diff --git a/.github/workflows/thiyagu.yaml b/.github/workflows/thiyagu.yaml new file mode 100644 index 00000000..b7968f85 --- /dev/null +++ b/.github/workflows/thiyagu.yaml @@ -0,0 +1,55 @@ +name: Validate OpenAPI Schema + +on: + pull_request: + branches: + - master + - draft + push: + branches: + - master + - draft + - github-action + +jobs: + validate_openapi_schema_meta: + name: Validate OpenAPI Schema for Meta + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Validate OpenAPI schema for meta.yaml + id: validate_meta + uses: thiyagu06/openapi-validator-action@v1 + with: + filepath: "./api/meta/build/meta.yaml" + + validate_openapi_schema_registry: + name: Validate OpenAPI Schema for registry + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Validate OpenAPI schema for registry.yaml + id: validate_registry + uses: thiyagu06/openapi-validator-action@v1 + with: + filepath: "./api/registry/build/registry.yaml" + + validate_openapi_schema_transaction: + name: Validate OpenAPI Schema for transaction + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Validate OpenAPI schema for transaction.yaml + id: validate_transaction + uses: thiyagu06/openapi-validator-action@v1 + with: + filepath: "./api/transaction/build/transaction.yaml" \ No newline at end of file From 0cddf323ed183b0ceb481a583691618f4b7901af Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 19:22:54 +0530 Subject: [PATCH 08/12] testing 404 --- .../workflows/Beckn-Core-Spec-Validator.yml | 1 + ...ication-openapi-validator-redocly.yaml.yml | 1 + .github/workflows/thiyagu.yaml | 54 +++++++------------ 3 files changed, 21 insertions(+), 35 deletions(-) diff --git a/.github/workflows/Beckn-Core-Spec-Validator.yml b/.github/workflows/Beckn-Core-Spec-Validator.yml index 6aef2978..2d479396 100644 --- a/.github/workflows/Beckn-Core-Spec-Validator.yml +++ b/.github/workflows/Beckn-Core-Spec-Validator.yml @@ -1,6 +1,7 @@ name: Validate Beckn core spec meta, registry and transaction Schema against OpenAPI Specification on: + workflow_dispatch: # This allows manual trigger via GitHub UI pull_request: branches: - main diff --git a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml index d7a545a7..04da116f 100644 --- a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml +++ b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml @@ -1,6 +1,7 @@ name: CI-RK on: + workflow_dispatch: # This allows manual trigger via GitHub UI # change this to the branch you want to test this workflow on push: branches: diff --git a/.github/workflows/thiyagu.yaml b/.github/workflows/thiyagu.yaml index b7968f85..461aba19 100644 --- a/.github/workflows/thiyagu.yaml +++ b/.github/workflows/thiyagu.yaml @@ -1,55 +1,39 @@ -name: Validate OpenAPI Schema - +name: OpenAPI Validation on: - pull_request: - branches: - - master - - draft - push: + pull_request: branches: - master - - draft - - github-action + + paths: + - 'transaction.yaml' + - 'meta.yaml' + - 'registry.yaml' jobs: - validate_openapi_schema_meta: - name: Validate OpenAPI Schema for Meta + transaction-validate: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v2 - - - name: Validate OpenAPI schema for meta.yaml - id: validate_meta - uses: thiyagu06/openapi-validator-action@v1 + - name: Validate OpenAPI specification + uses: stoplight/spectral@v3 with: - filepath: "./api/meta/build/meta.yaml" - - validate_openapi_schema_registry: - name: Validate OpenAPI Schema for registry + path: transaction.yaml + meta-validate: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v2 - - - name: Validate OpenAPI schema for registry.yaml - id: validate_registry - uses: thiyagu06/openapi-validator-action@v1 + - name: Validate OpenAPI specification + uses: stoplight/spectral@v3 with: - filepath: "./api/registry/build/registry.yaml" - - validate_openapi_schema_transaction: - name: Validate OpenAPI Schema for transaction + path: meta.yaml + registry-validate: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v2 - - - name: Validate OpenAPI schema for transaction.yaml - id: validate_transaction - uses: thiyagu06/openapi-validator-action@v1 + - name: Validate OpenAPI specification + uses: stoplight/spectral@v3 with: - filepath: "./api/transaction/build/transaction.yaml" \ No newline at end of file + path: registry.yaml \ No newline at end of file From 15c2710b3e884c5ffe3ade14a332875705906998 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 19:29:21 +0530 Subject: [PATCH 09/12] testing 404 --- .../workflows/Beckn-Core-Spec-Validator.yml | 12 ++++---- ...ication-openapi-validator-redocly.yaml.yml | 28 +++++++++---------- .github/workflows/thiyagu.yaml | 3 ++ 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/Beckn-Core-Spec-Validator.yml b/.github/workflows/Beckn-Core-Spec-Validator.yml index 2d479396..4d8ab06c 100644 --- a/.github/workflows/Beckn-Core-Spec-Validator.yml +++ b/.github/workflows/Beckn-Core-Spec-Validator.yml @@ -2,12 +2,12 @@ name: Validate Beckn core spec meta, registry and transaction Schema against Ope on: workflow_dispatch: # This allows manual trigger via GitHub UI - pull_request: - branches: - - main - push: - branches: - - draft + # pull_request: + # branches: + # - main + # push: + # branches: + # - draft jobs: validate_beckn_schema: diff --git a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml index 04da116f..fda48349 100644 --- a/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml +++ b/.github/workflows/protocl-specification-openapi-validator-redocly.yaml.yml @@ -3,20 +3,20 @@ name: CI-RK on: workflow_dispatch: # This allows manual trigger via GitHub UI # change this to the branch you want to test this workflow on - push: - branches: - - "master" - - "draft" - - "github-action" - pull_request: - branches: - - "master" - - "draft" - - "github-action" - paths: - - "api/meta/build/meta.yaml" - - "api/registry/build/registry.yaml" - - "api/transaction/build/transaction.yaml" + # push: + # branches: + # - "master" + # - "draft" + # - "github-action" + # pull_request: + # branches: + # - "master" + # - "draft" + # - "github-action" + # paths: + # - "api/meta/build/meta.yaml" + # - "api/registry/build/registry.yaml" + # - "api/transaction/build/transaction.yaml" jobs: validate: diff --git a/.github/workflows/thiyagu.yaml b/.github/workflows/thiyagu.yaml index 461aba19..792ef6aa 100644 --- a/.github/workflows/thiyagu.yaml +++ b/.github/workflows/thiyagu.yaml @@ -3,6 +3,9 @@ on: pull_request: branches: - master + push: + branches: + - github-action paths: - 'transaction.yaml' From 400180b9f8821d7018dc16e9b2d6ee8442a6e7df Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 19:30:46 +0530 Subject: [PATCH 10/12] removing harmless space --- api/meta/build/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/meta/build/meta.yaml b/api/meta/build/meta.yaml index f2e9f86c..72c597c5 100644 --- a/api/meta/build/meta.yaml +++ b/api/meta/build/meta.yaml @@ -3,7 +3,7 @@ info: title: Beckn Protocol Meta API description: This document contains all the meta API endpoints that are implemented by the network participants. The information returned from these endpoints typically contain cacheable information. version: 1.0.0 -security: +security: - SubscriberAuth: [] paths: /get_cancellation_reasons: From c76193ede39fcc50d3c9c7164ca50adc0b6e2460 Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 19:32:35 +0530 Subject: [PATCH 11/12] whatev --- .github/workflows/thiyagu.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/thiyagu.yaml b/.github/workflows/thiyagu.yaml index 792ef6aa..7cc86ccd 100644 --- a/.github/workflows/thiyagu.yaml +++ b/.github/workflows/thiyagu.yaml @@ -7,11 +7,6 @@ on: branches: - github-action - paths: - - 'transaction.yaml' - - 'meta.yaml' - - 'registry.yaml' - jobs: transaction-validate: runs-on: ubuntu-latest From b0458dcdb0f9e37486f0be72361b3b3e7449d0ab Mon Sep 17 00:00:00 2001 From: Rajaneesh Date: Wed, 15 Jan 2025 19:52:27 +0530 Subject: [PATCH 12/12] 430 --- .github/workflows/thiyagu.yaml | 62 ++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 15 deletions(-) diff --git a/.github/workflows/thiyagu.yaml b/.github/workflows/thiyagu.yaml index 7cc86ccd..fa7b74cf 100644 --- a/.github/workflows/thiyagu.yaml +++ b/.github/workflows/thiyagu.yaml @@ -1,37 +1,69 @@ -name: OpenAPI Validation +name: Validate OpenAPI + on: - pull_request: + pull_request: branches: - master - push: + - draft + push: branches: + - master - github-action jobs: - transaction-validate: + validate_meta: + name: Meta OpenAPI Schema Validation runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v2 - - name: Validate OpenAPI specification - uses: stoplight/spectral@v3 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 with: - path: transaction.yaml - meta-validate: + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for meta.yaml + run: openapi-validator ./api/meta/build/meta.yaml + + validate_registry: + name: Registry OpenAPI Schema Validation runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v2 - - name: Validate OpenAPI specification - uses: stoplight/spectral@v3 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 with: - path: meta.yaml - registry-validate: + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for registry.yaml + run: openapi-validator ./api/registry/build/registry.yaml + + validate_transaction: + name: Transaction OpenAPI Schema Validation runs-on: ubuntu-latest + steps: - name: Checkout code uses: actions/checkout@v2 - - name: Validate OpenAPI specification - uses: stoplight/spectral@v3 + + - name: Install Node.js and NPM + uses: actions/setup-node@v2 with: - path: registry.yaml \ No newline at end of file + node-version: 16 + + - name: Install IBM OpenAPI Validator + run: npm install -g @ibm-cloud/openapi-validator + + - name: Validate OpenAPI schema for transaction.yaml + run: openapi-validator ./api/transaction/build/transaction.yaml \ No newline at end of file