From 1a29daa93cf632c1a863f7eaa23ba03f6e52b607 Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Thu, 29 Dec 2022 19:03:10 -0500 Subject: [PATCH 1/2] implement github actions workflow --- .github/workflows/default.yml | 15 +++++++++++++++ README.md | 4 ++-- examples/1-standard/api.yaml | 9 ++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/default.yml diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml new file mode 100644 index 00000000..8374f5a6 --- /dev/null +++ b/.github/workflows/default.yml @@ -0,0 +1,15 @@ +name: Build and Test + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: npm install + - name: Build the project + run: npm run build + - name: Test the project + run: npm test \ No newline at end of file diff --git a/README.md b/README.md index bd2c0e1f..cc52ae17 100644 --- a/README.md +++ b/README.md @@ -77,9 +77,9 @@ app.use((err, req, res, next) => { _**Important:** Ensure express is configured with all relevant body parsers. Body parser middleware functions must be specified prior to any validated routes. See an [example](#example-express-api-server)_. -## [Documentation](https://github.com/cdimascio/express-openapi-validator/wiki/Documentation) +## [Documentation](https://github.com/cdimascio/express-openapi-validator/wiki) -See the [wiki](https://github.com/cdimascio/express-openapi-validator/wiki/Documentation) for complete documenation +See the [wiki](https://github.com/cdimascio/express-openapi-validator/wiki) for complete documenation ## License diff --git a/examples/1-standard/api.yaml b/examples/1-standard/api.yaml index 75b9cc99..475f0a23 100644 --- a/examples/1-standard/api.yaml +++ b/examples/1-standard/api.yaml @@ -8,7 +8,14 @@ info: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html servers: - - url: /v1 + - url: http://{base_url}/{env_id} + variables: + base_url: + default: my.app.com + description: server + env_id: + default: v1 + description: path selector paths: /ping: get: From 43e6da204261d5cdecce16be04f0d4b7f102ac45 Mon Sep 17 00:00:00 2001 From: Carmine DiMascio Date: Thu, 29 Dec 2022 19:06:01 -0500 Subject: [PATCH 2/2] fix target --- .github/workflows/default.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 8374f5a6..cf1bb630 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -10,6 +10,6 @@ jobs: - name: Install dependencies run: npm install - name: Build the project - run: npm run build + run: npm run compile - name: Test the project run: npm test \ No newline at end of file