From 0d7bb3cca99ae5092342a875831f42be43cb18e9 Mon Sep 17 00:00:00 2001 From: Justin Auger Date: Sat, 24 Jun 2023 05:35:42 +0100 Subject: [PATCH] Add a github action that generates a couple of clients using openapi generator (#60) Adds a quick layer of validation at CI level. --- .github/workflows/validate.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/validate.yml diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml new file mode 100644 index 0000000..83b25ac --- /dev/null +++ b/.github/workflows/validate.yml @@ -0,0 +1,26 @@ +name: Validate OpenAPI Spec + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + generate: + runs-on: ubuntu-latest + name: Generate Clients + steps: + - uses: actions/checkout@v2 + + - name: Typescript Axios + uses: openapi-generators/openapitools-generator-action@v1 + with: + generator: typescript-axios + openapi-file: ./reference/SpaceTraders.json + + - name: Dart + uses: openapi-generators/openapitools-generator-action@v1 + with: + generator: dart + openapi-file: ./reference/SpaceTraders.json