Skip to content

Commit 8598d98

Browse files
authored
Update npm run commands (#169)
* Update npm run commands * Update CI/CD workflow
1 parent 3ef6f35 commit 8598d98

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ jobs:
3838
- run: npm install
3939
- name: Lint openapi specifications
4040
run: |
41-
npm run lint:ibm --entrypoint=openapi/${{ matrix.api }}/openapi.yaml
41+
npm run lint --api=${{ matrix.api }}
42+
npm run validate --api=${{ matrix.api }}
4243
4344
build-and-publish:
4445
needs: [lint]

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
"ibm-openapi-validator": "0.34.1"
66
},
77
"scripts": {
8-
"start": "openapi preview-docs $npm_config_entrypoint",
9-
"build": "openapi bundle -o openapi.yaml $npm_config_entrypoint",
10-
"lint": "openapi lint $npm_config_entrypoint",
8+
"start": "openapi preview-docs ./openapi/${npm_config_api}/openapi.yaml",
9+
"build": "openapi bundle -o openapi.yaml ./openapi/${npm_config_api}/openapi.yaml",
10+
"lint": "openapi lint ./openapi/${npm_config_api}/openapi.yaml",
1111
"lint:all": "openapi lint openapi/*/openapi.yaml",
12-
"lint:ibm": "openapi bundle -o openapi.yaml $npm_config_entrypoint && ./node_modules/.bin/lint-openapi openapi.yaml",
13-
"validate:schemas": "python tools/validate/validate.py validate --json_filepath test/json-samples/tool.json --schema_filepath json-schema/schemas/tool.json"
12+
"validate": "npm run build --api=${npm_config_api} && ./node_modules/.bin/lint-openapi openapi.yaml"
1413
}
1514
}

0 commit comments

Comments
 (0)