From 7fa548c8cf22360cdea5814d4f6dc980d9e67064 Mon Sep 17 00:00:00 2001 From: Viicos <65306057+Viicos@users.noreply.github.com> Date: Tue, 12 Dec 2023 14:02:16 +0100 Subject: [PATCH] [#351] Update OAS documentation --- src/objects/api/serializers.py | 2 +- src/objects/api/v2/openapi.yaml | 2 ++ src/objects/api/v2/views.py | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/objects/api/serializers.py b/src/objects/api/serializers.py index cbf908eb..4b21a948 100644 --- a/src/objects/api/serializers.py +++ b/src/objects/api/serializers.py @@ -9,8 +9,8 @@ from objects.utils.serializers import DynamicFieldsMixin from .fields import ObjectSlugRelatedField, ObjectTypeField, ObjectUrlField -from .validators import GeometryValidator, IsImmutableValidator, JsonSchemaValidator from .utils import merge_patch +from .validators import GeometryValidator, IsImmutableValidator, JsonSchemaValidator class ObjectRecordSerializer(serializers.ModelSerializer): diff --git a/src/objects/api/v2/openapi.yaml b/src/objects/api/v2/openapi.yaml index 0bd6bf1d..e5e491c8 100644 --- a/src/objects/api/v2/openapi.yaml +++ b/src/objects/api/v2/openapi.yaml @@ -377,6 +377,8 @@ paths: patch: operationId: object_partial_update description: Update the OBJECT by creating a new RECORD with the updates values. + The provided `record.data` value will be merged with the existing record data, + according to [RFC7396](https://datatracker.ietf.org/doc/html/rfc7396). parameters: - in: header name: Accept-Crs diff --git a/src/objects/api/v2/views.py b/src/objects/api/v2/views.py index 702146b1..816f7d61 100644 --- a/src/objects/api/v2/views.py +++ b/src/objects/api/v2/views.py @@ -42,7 +42,9 @@ description="Update the OBJECT by creating a new RECORD with the updates values." ), partial_update=extend_schema( - description="Update the OBJECT by creating a new RECORD with the updates values." + description="Update the OBJECT by creating a new RECORD with the updates values. " + "The provided `record.data` value will be merged with the existing record data, according " + "to [RFC7396](https://datatracker.ietf.org/doc/html/rfc7396)." ), destroy=extend_schema( description="Delete an OBJECT and all RECORDs belonging to it.",