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

Master into Develop #226

Merged
merged 4 commits into from
Aug 29, 2023
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
commit = False
tag = False
current_version = 1.4.0
current_version = 1.4.1
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)([-](?P<release>(rc|alpha))+(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
===========
Wijzigingen
===========
1.4.1 (2023-08-29)
===========

- **Changed:** schema generation such that the `lock` attribute shows up in EIO.bestandsdelen GET response.

Implementation changes
----------------------

1.4.0 (2023-08-22)
===========
Expand Down
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Versie Release datum API specificatie
master n.v.t. `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/gemma-documentregistratiecomponent/master/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/master/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/master/src/notificaties.md>`_
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/VNG-Realisatie/gemma-documentregistratiecomponent/master/src/openapi.yaml>`_
(`verschillen <https://github.com/VNG-Realisatie/documenten-api/compare/stable/1.2.x..master>`_)
1.4.1 2023-08-29 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.1/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.1/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.1/src/notificaties.md>`_
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.1/src/openapi.yaml>`_
1.4.0 2023-08-22 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.0/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.0/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.4.0/src/notificaties.md>`_
`Swagger <https://petstore.swagger.io/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/1.4.0/src/openapi.yaml>`_
1.3.x 2023-03-29 `ReDoc <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/VNG-Realisatie/documenten-api/stable/1.3.x/src/openapi.yaml>`_, `Scopes <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.3.x/src/autorisaties.md>`_ `Berichtkenmerken <https://github.com/VNG-Realisatie/documenten-api/blob/stable/1.3.x/src/notificaties.md>`_
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drc",
"version": "1.4.0",
"version": "1.4.1",
"description": "drc referentie implementatie API",
"main": "src/index.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion src/drc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import re
from collections import namedtuple

__version__ = "1.4.0"
__version__ = "1.4.1"
__author__ = "VNG Realisatie"
__homepage__ = "https://github.com/VNG-Realisatie/documenten-api"
__docformat__ = "restructuredtext"
Expand Down
6 changes: 6 additions & 0 deletions src/drc/api/serializers/bestandsdeel.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ def validate(self, attrs):
)

return valid_attrs


class SchemaBestandsDeelSerializer(BestandsDeelSerializer):
lock = serializers.CharField(
help_text="Hash string, which represents id of the lock of related informatieobject",
)
11 changes: 10 additions & 1 deletion src/drc/api/serializers/enkelvoudig_informatieobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@

from drc.api.auth import get_ztc_auth
from drc.api.fields import AnyBase64File
from drc.api.serializers.bestandsdeel import BestandsDeelSerializer
from drc.api.serializers.bestandsdeel import (
BestandsDeelSerializer,
SchemaBestandsDeelSerializer,
)
from drc.api.utils import create_filename, merge_files
from drc.api.validators import StatusValidator
from drc.datamodel.constants import ChecksumAlgoritmes, OndertekeningSoorten, Statussen
Expand Down Expand Up @@ -497,3 +500,9 @@ class EIOZoekSerializer(serializers.Serializer):
child=serializers.UUIDField(),
help_text=_("Array of unieke resource identifiers (UUID4)"),
)


class SchemaEIOSerializer(EnkelvoudigInformatieObjectSerializer):
bestandsdelen = SchemaBestandsDeelSerializer(
source="canonical.bestandsdelen", many=True, read_only=True
)
2 changes: 1 addition & 1 deletion src/drc/api/tests/test_dso_api_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_api_19_documentation_version_yaml(self):
@override_settings(ROOT_URLCONF="drc.api.tests.test_urls")
def test_api_24_version_header(self):
response = self.client.get("/test-view")
self.assertEqual(response["API-version"], "1.4.0")
self.assertEqual(response["API-version"], "1.4.1")


class DSOApi50Tests(APITestCase):
Expand Down
1 change: 1 addition & 0 deletions src/drc/api/views/bestandsdeel.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from drc.api.schema import BestandsDeelSchema
from drc.api.scopes import SCOPE_DOCUMENTEN_BIJWERKEN
from drc.api.serializers import BestandsDeelSerializer
from drc.api.serializers.bestandsdeel import SchemaBestandsDeelSerializer
from drc.datamodel.models.bestandsdeel import BestandsDeel


Expand Down
8 changes: 6 additions & 2 deletions src/drc/api/views/enkelvoudig_informatieobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
LockEnkelvoudigInformatieObjectSerializer,
UnlockEnkelvoudigInformatieObjectSerializer,
)
from drc.api.serializers.enkelvoudig_informatieobject import EIOZoekSerializer
from drc.api.serializers.enkelvoudig_informatieobject import (
EIOZoekSerializer,
SchemaEIOSerializer,
)
from drc.api.views.constants import REGISTRATIE_QUERY_PARAM, VERSIE_QUERY_PARAM
from drc.datamodel.models import EnkelvoudigInformatieObject

Expand Down Expand Up @@ -256,7 +259,8 @@ def get_serializer_class(self, *args, **kwargs):
return EnkelvoudigInformatieObjectSerializer

@extend_schema(
parameters=[VERSIE_QUERY_PARAM, REGISTRATIE_QUERY_PARAM, EXPAND_QUERY_PARAM]
parameters=[VERSIE_QUERY_PARAM, REGISTRATIE_QUERY_PARAM, EXPAND_QUERY_PARAM],
responses=SchemaEIOSerializer,
)
def retrieve(self, request, *args, **kwargs):
return super().retrieve(request, *args, **kwargs)
Expand Down
2 changes: 1 addition & 1 deletion src/drc/conf/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from vng_api_common.conf.api import * # noqa - imports white-listed

API_VERSION = "1.4.0"
API_VERSION = "1.4.1"

REST_FRAMEWORK = BASE_REST_FRAMEWORK.copy()
REST_FRAMEWORK["PAGE_SIZE"] = 100
Expand Down
Loading