-
Notifications
You must be signed in to change notification settings - Fork 3
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
👷 add gh actions to check OAS #202
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
4216120
:construction_worker: [https://github.com/open-zaak/open-zaak/issues/…
annashamray 2223f63
:construction_worker: [https://github.com/open-zaak/open-zaak/issues/…
annashamray 3190e69
:ok_hand: [https://github.com/open-zaak/open-zaak/issues/1708] update…
annashamray File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: generate-postman-collection | ||
|
||
on: | ||
push: | ||
paths: | ||
- "src/openklant/components/*/openapi.yaml" | ||
- ".github/workflows/generate-postman-collection.yml" | ||
branches: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
component: ['contactgegevens', 'klantinteracties'] | ||
|
||
name: Run with component ${{ matrix.component }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
- 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/openklant/components/${{ matrix.component }}/openapi.yaml -o ./tests/postman/collection.json --pretty |
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,42 @@ | ||
name: generate-sdks | ||
|
||
on: | ||
push: | ||
paths: | ||
- "src/openklant/components/*/openapi.yaml" | ||
- ".github/workflows/generate-sdks.yml" | ||
branches: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
component: ['contactgegevens', 'klantinteracties'] | ||
|
||
name: Run with component ${{ matrix.component }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
- name: Install dependencies | ||
run: npm install -g @openapitools/openapi-generator-cli | ||
- name: Determining oas path | ||
id: vars | ||
run: echo ::set-output name=oas::./src/openklant/components/${{ matrix.component }}/openapi.yaml | ||
- name: Validate schema | ||
run: openapi-generator-cli validate -i ${{ steps.vars.outputs.oas }} | ||
- name: Generate Java client | ||
run: openapi-generator-cli generate -i ${{ steps.vars.outputs.oas }} --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 client | ||
run: openapi-generator-cli generate -i ${{ steps.vars.outputs.oas }} --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 ${{ steps.vars.outputs.oas }} --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ | ||
-o ./sdks/python -g python --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false+ |
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,30 @@ | ||
name: lint-oas | ||
|
||
on: | ||
push: | ||
paths: | ||
- "src/openklant/components/*/openapi.yaml" | ||
- .github/workflows/lint-oas.yml | ||
branches: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
component: ['contactgegevens', 'klantinteracties'] | ||
|
||
name: Run with component ${{ matrix.component }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
- name: Install spectral | ||
run: npm install -g @stoplight/spectral@5 | ||
- name: Run OAS linter | ||
run: spectral lint ./src/openklant/components/${{ matrix.component }}/openapi.yaml |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The schemas probably have to be regenerated to add these tags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Updated OAS