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

👷 [maykinmedia/open-api-framework#115] Always run OAS check #58

Merged
merged 3 commits into from
Mar 6, 2025
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
10 changes: 2 additions & 8 deletions .github/workflows/oas-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ name: check-oas

on:
push:
paths:
- "src/referentielijsten/api/openapi.yaml"
- ".github/workflows/oas-check.yml"
branches:
- '**'
workflow_dispatch:

jobs:
open-api-workflow-check-oas:
uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v1
uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v5.0.0
with:
python-version: '3.11'

schema-path: 'src/referentielijsten/api/openapi.yaml'

schema-options: 'src/referentielijsten/api/openapi.yaml'
django-settings-module: 'referentielijsten.conf.ci'
5 changes: 4 additions & 1 deletion bin/generate_schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
#
# Run this script from the root of the repository

src/manage.py spectacular --file src/referentielijsten/api/openapi.yaml --validate
src/manage.py spectacular \
--file src/referentielijsten/api/openapi.yaml \
--validate \
--lang="nl-nl"
12 changes: 0 additions & 12 deletions src/referentielijsten/api/openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
openapi: 3.0.3

Check warning on line 1 in src/referentielijsten/api/openapi.yaml

View workflow job for this annotation

GitHub Actions / open-api-workflow-lint-oas / lint-oas-files

oas3-api-servers

Check warning on line 1 in src/referentielijsten/api/openapi.yaml

View workflow job for this annotation

GitHub Actions / open-api-workflow-lint-oas / lint-oas-files

openapi-tags
info:
title: Referentielijsten API
version: 0.1.0
Expand Down Expand Up @@ -34,7 +34,7 @@
description: De waarde van de `tabel__code` die gelinkt is aan de items.
required: true
tags:
- items

Check warning on line 37 in src/referentielijsten/api/openapi.yaml

View workflow job for this annotation

GitHub Actions / open-api-workflow-lint-oas / lint-oas-files

operation-tag-defined Operation tags should be defined in global tags.
security:
- {}
responses:
Expand Down Expand Up @@ -79,7 +79,7 @@
schema:
type: integer
tags:
- tabellen

Check warning on line 82 in src/referentielijsten/api/openapi.yaml

View workflow job for this annotation

GitHub Actions / open-api-workflow-lint-oas / lint-oas-files

operation-tag-defined Operation tags should be defined in global tags.
security:
- {}
responses:
Expand All @@ -93,18 +93,6 @@
schemas:
Beheerder:
type: object
description: |-
Generate a serializer out of a GegevensGroepType.

Usage::

>>> class VerlengingSerializer(GegevensGroepSerializer):
... class Meta:
... model = Zaak
... gegevensgroep = 'verlenging'
>>>

Where ``Zaak.verlenging`` is a :class:``GegevensGroepType``.
properties:
naam:
type: string
Expand Down
8 changes: 8 additions & 0 deletions src/referentielijsten/conf/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,11 @@ msgstr "Ongeldige postcode."
#: referentielijsten/utils/validators.py:32
msgid "Invalid mobile phonenumber."
msgstr "Ongeldig mobiel telefoonnumer."

#: conf/base.py:200
msgid "A page number within the paginated result set."
msgstr "Een pagina binnen de gepagineerde set resultaten."

#: conf/base.py:201
msgid "Number of results to return per page."
msgstr "Het aantal resultaten terug te geven per pagina."