Skip to content

Commit b7128a8

Browse files
committed
NPA-3899 Validate Consent Example
1 parent 495c310 commit b7128a8

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

.github/workflows/schema-checks.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,8 @@ jobs:
1818
run: npm install -g
1919

2020
- name: Run Schema Validation
21-
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"
21+
run: npm run validate-example
22+
env:
23+
EXAMPLE_PATH: specification/examples/responses/GET_Consent/adults-consenting.yaml
24+
SCHEMA_PATH: specification/validated-relationships-service-api.yaml
25+
SCHEMA_OBJECT: "#/components/schemas/ConsentBundle"

package-lock.json

Lines changed: 19 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"scripts": {
66
"lint": "node_modules/.bin/openapi-generator-cli validate -i specification/validated-relationships-service-api.yaml",
77
"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",
8-
"check-licenses": "node_modules/.bin/license-checker --failOn GPL --failOn LGPL"
8+
"check-licenses": "node_modules/.bin/license-checker --failOn GPL --failOn LGPL",
9+
"validate-example" :"schema validate --filePath $EXAMPLE_PATH --schema $SCHEMA_PATH --schema-obj $SCHEMA_OBJECT"
910
},
1011
"author": "NHS Digital",
1112
"license": "MIT",
@@ -14,9 +15,7 @@
1415
"@openapitools/openapi-generator-cli": "^2.15.3",
1516
"apigeetool": "^0.16.4",
1617
"license-checker": "^25.0.1",
17-
"minimist": "^1.2.2"
18-
},
19-
"dependencies": {
18+
"minimist": "^1.2.2",
2019
"yaml-schema-validator": "^1.2.3"
2120
}
2221
}

0 commit comments

Comments
 (0)