Skip to content

Commit 2a15bba

Browse files
committed
test 5
1 parent f12e3ec commit 2a15bba

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: "Lint and Validate OpenAPI v2 Spec"
22
description: "Lint and validate an OpenAPI v2 (Swagger) specification using Spectral and Swagger CLI"
33
inputs:
4-
spec-file:
5-
description: "Path to the OpenAPI v2 (Swagger) specification file"
4+
apim-env:
5+
description: "APIM environment for constructing the spec"
66
required: true
77

88
runs:
@@ -11,17 +11,28 @@ runs:
1111
- name: Set up Node.js
1212
uses: actions/setup-node@v4
1313
with:
14-
node-version: '20'
14+
node-version: "20"
15+
16+
- name: Install dependencies
17+
shell: bash
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y make
1521
1622
- name: Install Spectral and Swagger CLI
1723
shell: bash
1824
run: |
1925
npm install -g @stoplight/spectral-cli swagger-cli
2026
27+
- name: Construct OpenAPI Spec
28+
shell: bash
29+
run: |
30+
make construct-spec APIM_ENV=${{ inputs.apim-env }}
31+
2132
- name: Lint OpenAPI Spec with Spectral
2233
shell: bash
23-
run: spectral lint --ruleset .spectral.yaml ${{ inputs.spec-file }}
34+
run: spectral lint --ruleset .spectral.yaml build/specification/eligibility-signposting-api.yaml
2435

2536
- name: Validate OpenAPI Spec with Swagger CLI
2637
shell: bash
27-
run: swagger-cli validate ${{ inputs.spec-file }}
38+
run: swagger-cli validate build/specification/eligibility-signposting-api.yaml

.github/workflows/stage-1-commit.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,5 @@ jobs:
118118
- uses: actions/checkout@v4
119119
- uses: ./.github/actions/lint-and-validate-specification
120120
with:
121-
spec-file: specification/eligibility-signposting-api.yaml
121+
spec-file: build/specification/eligibility-signposting-api.yaml
122+
apim-env: sandbox # or your desired environment

0 commit comments

Comments
 (0)