File tree 2 files changed +18
-19
lines changed
2 files changed +18
-19
lines changed Original file line number Diff line number Diff line change 13
13
14
14
permissions :
15
15
id-token : write
16
- contents : write
16
+ contents : read
17
17
issues : write
18
18
pull-requests : write
19
- # checks: write
20
19
21
20
jobs :
22
21
build-test :
50
49
dotnet new tool-manifest
51
50
dotnet tool install SwashBuckle.AspNetCore.Cli
52
51
52
+ - name : Install Spectral Cli
53
+ shell : bash
54
+ run : |
55
+ curl -L https://raw.github.com/stoplightio/spectral/master/scripts/install.sh | sh
56
+
53
57
- name : Restore NuGet packages
54
58
shell : bash
55
59
run : |
@@ -60,17 +64,13 @@ jobs:
60
64
run : |
61
65
dotnet build
62
66
63
- - name : Create openapi.json
67
+ - name : Lint OpenAPI doc
64
68
shell : bash
65
- run : |
69
+ run : |
66
70
API_VERSION=$(grep -oP 'public const string Version = "\K[^"]+' ./src/AzureOpenAIProxy.ApiApp/Constants.cs)
67
71
dotnet swagger tofile --output ./openapi.json ./src/AzureOpenAIProxy.ApiApp/bin/Debug/net8.0/AzureOpenAIProxy.ApiApp.dll $API_VERSION
68
72
69
- - name : Lint OpenAPI doc
70
- uses : stoplightio/spectral-action@latest
71
- with :
72
- file_glob : ' ./openapi.json'
73
- repo_token : ${{ secrets.GH_PAT_GRAINED }}
73
+ spectral lint -f json -f github-actions -F warn openapi.json
74
74
75
75
- name : Install playwright
76
76
shell : pwsh
Original file line number Diff line number Diff line change 10
10
11
11
permissions :
12
12
id-token : write
13
- contents : write
14
- # checks: write
13
+ contents : read
15
14
16
15
jobs :
17
16
build-test-deploy :
63
62
run : |
64
63
dotnet new tool-manifest
65
64
dotnet tool install SwashBuckle.AspNetCore.Cli
65
+
66
+ - name : Install Spectral Cli
67
+ shell : bash
68
+ run : |
69
+ curl -L https://raw.github.com/stoplightio/spectral/master/scripts/install.sh | sh
66
70
67
71
- name : Restore NuGet packages
68
72
shell : bash
@@ -74,18 +78,13 @@ jobs:
74
78
run : |
75
79
dotnet build -c Release
76
80
77
- - name : Create openapi.json
81
+ - name : Lint OpenAPI doc
78
82
shell : bash
79
- run : |
83
+ run : |
80
84
API_VERSION=$(grep -oP 'public const string Version = "\K[^"]+' ./src/AzureOpenAIProxy.ApiApp/Constants.cs)
81
85
dotnet swagger tofile --output ./openapi.json ./src/AzureOpenAIProxy.ApiApp/bin/Debug/net8.0/AzureOpenAIProxy.ApiApp.dll $API_VERSION
82
86
83
- - name : Lint OpenAPI doc
84
- uses : stoplightio/spectral-action@latest
85
- with :
86
- file_glob : ' ./openapi.json'
87
- repo_token : ${{ secrets.GH_PAT_GRAINED }}
88
-
87
+ spectral lint -f json -f github-actions -F warn openapi.json
89
88
90
89
- name : Test solution
91
90
You can’t perform that action at this time.
0 commit comments