From 132f8d9fd0e004073fda34957672cffec74f87fe Mon Sep 17 00:00:00 2001 From: "Robert P. Goldman" Date: Tue, 12 Apr 2022 09:19:13 -0500 Subject: [PATCH] Add action validating OpenAPI (swagger) spec. Adapted action from this posting: https://swagger.io/blog/api-design/validate-openapi-definitions-swagger-editor/ --- .github/workflows/api-spec.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/api-spec.yml diff --git a/.github/workflows/api-spec.yml b/.github/workflows/api-spec.yml new file mode 100644 index 0000000..e1cc8cc --- /dev/null +++ b/.github/workflows/api-spec.yml @@ -0,0 +1,25 @@ +# Adapted from this posting: +# https://swagger.io/blog/api-design/validate-openapi-definitions-swagger-editor/ + +on: + push: + branches: + - '**' + pull_request: + branches: + - master + workflow_dispatch: + + +jobs: + test_swagger_editor_validator_remote: + runs-on: ubuntu-latest + name: Swagger Editor Validator Remote + + + steps: + - uses: actions/checkout@v2 + - name: Validate OpenAPI definition + uses: char0n/swagger-editor-validate@v1 + with: + definition-file: src/main/resources/docs/swagger.yaml