Skip to content

Commit 1d3e7e8

Browse files
committed
use spectral-action instead of spectral cli
spectral cli is not suitable for providing report Related to: aliencube#221
1 parent f01d6ac commit 1d3e7e8

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/azure-dev-build-only.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,16 @@ jobs:
6565
run: |
6666
dotnet build
6767
68-
69-
- name: Lint OpenAPI doc
68+
- name: Create openapi.json
7069
shell: bash
7170
run: |
7271
API_VERSION=$(grep -oP 'public const string Version = "\K[^"]+' ./src/AzureOpenAIProxy.ApiApp/Constants.cs)
7372
dotnet swagger tofile --output ./openapi.json ./src/AzureOpenAIProxy.ApiApp/bin/Debug/net8.0/AzureOpenAIProxy.ApiApp.dll $API_VERSION
74-
spectral lint openapi.json
73+
74+
- name: Lint OpenAPI doc
75+
uses: stoplightio/spectral-action@latest
76+
with:
77+
file_glob: './openapi.json'
7578

7679
- name: Install playwright
7780
shell: pwsh

.github/workflows/azure-dev.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,16 @@ jobs:
7979
run: |
8080
dotnet build -c Release
8181
82-
- name: Lint OpenAPI doc
82+
- name: Create openapi.json
8383
shell: bash
8484
run: |
8585
API_VERSION=$(grep -oP 'public const string Version = "\K[^"]+' ./src/AzureOpenAIProxy.ApiApp/Constants.cs)
8686
dotnet swagger tofile --output ./openapi.json ./src/AzureOpenAIProxy.ApiApp/bin/Debug/net8.0/AzureOpenAIProxy.ApiApp.dll $API_VERSION
87-
spectral lint openapi.json
87+
88+
- name: Lint OpenAPI doc
89+
uses: stoplightio/spectral-action@latest
90+
with:
91+
file_glob: './openapi.json'
8892

8993
- name: Test solution
9094

0 commit comments

Comments
 (0)