Skip to content

Commit

Permalink
NPA-3899 Validate Consent Example
Browse files Browse the repository at this point in the history
  • Loading branch information
JackPlowman committed Nov 15, 2024
1 parent 495c310 commit b7128a8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/schema-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ jobs:
run: npm install -g

- name: Run Schema Validation
run: npx run schema validate --filePath specification/examples/responses/GET_Consent/adults-consenting.yaml --schema specification/validated-relationships-service-api.yaml --schema-obj "#/components/schemas/ConsentBundle"
run: npm run validate-example
env:
EXAMPLE_PATH: specification/examples/responses/GET_Consent/adults-consenting.yaml
SCHEMA_PATH: specification/validated-relationships-service-api.yaml
SCHEMA_OBJECT: "#/components/schemas/ConsentBundle"
23 changes: 19 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"scripts": {
"lint": "node_modules/.bin/openapi-generator-cli validate -i specification/validated-relationships-service-api.yaml",
"publish": "./node_modules/.bin/openapi-generator-cli generate -i specification/validated-relationships-service-api.yaml --generator-key v3.0 -g openapi -o build && rm openapitools.json && mv build/openapi.json build/validated-relationships-service-api.json",
"check-licenses": "node_modules/.bin/license-checker --failOn GPL --failOn LGPL"
"check-licenses": "node_modules/.bin/license-checker --failOn GPL --failOn LGPL",
"validate-example" :"schema validate --filePath $EXAMPLE_PATH --schema $SCHEMA_PATH --schema-obj $SCHEMA_OBJECT"
},
"author": "NHS Digital",
"license": "MIT",
Expand All @@ -14,9 +15,7 @@
"@openapitools/openapi-generator-cli": "^2.15.3",
"apigeetool": "^0.16.4",
"license-checker": "^25.0.1",
"minimist": "^1.2.2"
},
"dependencies": {
"minimist": "^1.2.2",
"yaml-schema-validator": "^1.2.3"
}
}

0 comments on commit b7128a8

Please sign in to comment.