Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/GitHub workflows #68

Merged
merged 2 commits into from
Oct 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/generate-postman-collection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: generate-postman-collection

on:
push:
paths:
- "src/openapi.yaml"
- ".github/workflows/generate-postman-collection.yml"
branches:
- '**'
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install dependencies
run: npm install -g openapi-to-postmanv2
- name: Create tests folder
run: mkdir -p ./tests/postman
- name: Generate Postman collection
run: openapi2postmanv2 -s ./src/openapi.yaml -o ./tests/postman/collection.json --pretty
36 changes: 36 additions & 0 deletions .github/workflows/generate-sdks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: generate-sdks

on:
push:
paths:
- "src/openapi.yaml"
- ".github/workflows/generate-sdks.yml"
branches:
- '**'
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install dependencies
run: npm install -g @openapitools/openapi-generator-cli
- name: Validate schema
run: openapi-generator-cli validate -i ./src/openapi.yaml
- name: Generate Java client
run: openapi-generator-cli generate -i ./src/openapi.yaml --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \
-o ./sdks/java -g java --additional-properties=dateLibrary=java8,java8=true,optionalProjectFile=false,optionalAssemblyInfo=false
- name: Generate .NET Core client
run: openapi-generator-cli generate -i ./src/openapi.yaml --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \
-o ./sdks/netcore -g csharp-netcore --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false
- name: Generate .NET Full Framework client
run: openapi-generator-cli generate -i ./src/openapi.yaml --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \
-o ./sdks/net -g csharp --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false
- name: Generate Python client
run: openapi-generator-cli generate -i ./src/openapi.yaml --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \
-o ./sdks/python -g python --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false+
24 changes: 24 additions & 0 deletions .github/workflows/lint-oas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: lint-oas

on:
push:
paths:
- src/openapi.yaml
- .github/workflows/lint-oas.yml
branches:
- '**'
workflow_dispatch:

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12'
- name: Install spectral
run: npm install -g @stoplight/spectral
- name: Run OAS linter
run: spectral lint ./src/openapi.yaml
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ local.py
.env

docs/_build

# Statics generated by Workflows
/tests/postman
/sdks/
openapitools.json
14 changes: 13 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ besluitregistratiecomponent
:Keywords: zaken, zaakgericht werken, GEMMA, RGBZ, BRC
:PythonVersion: 3.6

|build-status|
|build-status| |lint-oas| |generate-sdks| |generate-postman-collection|

Referentieimplementatie van de besluitregistratiecomponent (BRC).

Expand Down Expand Up @@ -50,6 +50,18 @@ References
:target: https://requires.io/github/VNG-Realisatie/gemma-besluitregistratiecomponent/requirements/?branch=master
:alt: Requirements status

.. |lint-oas| image:: https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent/workflows/lint-oas/badge.svg
:alt: Lint OAS
:target: https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent/actions?query=workflow%3Alint-oas

.. |generate-sdks| image:: https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent/workflows/generate-sdks/badge.svg
:alt: Generate SDKs
:target: https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent/actions?query=workflow%3Agenerate-sdks

.. |generate-postman-collection| image:: https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent/workflows/generate-postman-collection/badge.svg
:alt: Generate Postman collection
:target: https://github.com/VNG-Realisatie/gemma-besluitregistratiecomponent/actions?query=workflow%3Agenerate-postman-collection

.. _testomgeving: https://ref.tst.vng.cloud/brc/

Licentie
Expand Down