-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add openapi linter + openapi.json (#49)
Co-authored-by: GitHub Actions <[email protected]>
- Loading branch information
1 parent
074565d
commit 2bb0490
Showing
5 changed files
with
1,197 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,27 @@ jobs: | |
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git commit -am "Update endpoint docs" | ||
git commit -am "Update endpoint docs" || echo "No changes to commit" | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install swagger-cli | ||
run: | | ||
npm install -g swagger-cli | ||
npm install -g openapi-format | ||
- name: Lint and Convert openapi.yml to openapi.json and commit changes | ||
run: | | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jzanecook
Collaborator
|
||
cd .. | ||
npx openapi-format schemas/openapi.yml --output schemas/openapi.yml | ||
swagger-cli bundle -r schemas/openapi.yml -o schemas/openapi.json -t json | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Actions" | ||
git add schemas/openapi.yml | ||
git add schemas/openapi.json | ||
git commit -am "Lint OpenAPI schemas" || echo "No changes to commit" | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY | ||
apis[] = {"apiId":"63f5e342-f43f-45fa-9a50-87934ccddcab"} | ||
configVersion = 1.0.0 | ||
type = api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY | ||
configVersion = 1.0.0 | ||
type = apiEntityData | ||
|
||
[config] | ||
id = 63f5e342-f43f-45fa-9a50-87934ccddcab | ||
|
||
[config.relations] | ||
|
||
[config.relations.collections] | ||
rootDirectory = postman/collections | ||
|
||
[config.relations.collections.metaData] | ||
|
||
[config.relations.apiDefinition] | ||
rootDirectory = schemas | ||
files[] = {"path":"openapi.json","metaData":{}} | ||
files[] = {"path":"openapi.yml","metaData":{}} | ||
|
||
[config.relations.apiDefinition.metaData] | ||
type = openapi:3 | ||
rootFiles[] = openapi.yml |
Oops, something went wrong.
sex.de