From b07f43315e548f38d224a8ed0d23bac47dfc783a Mon Sep 17 00:00:00 2001 From: Anna Shamray Date: Mon, 9 Dec 2024 17:17:37 +0100 Subject: [PATCH] :memo: [#472] update description of 'data_attrs' query param in the OAS --- src/objects/api/v2/filters.py | 3 +++ src/objects/api/v2/openapi.yaml | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/objects/api/v2/filters.py b/src/objects/api/v2/filters.py index ad8c5c03..f7bb2ecf 100644 --- a/src/objects/api/v2/filters.py +++ b/src/objects/api/v2/filters.py @@ -77,6 +77,9 @@ class ObjectRecordFilterSet(FilterSet): Example: in order to display only objects with `height` equal to 100, query `data_attrs=height__exact__100` should be used. If `height` is nested inside `dimensions` attribute, query should look like `data_attrs=dimensions__height__exact__100` + +If you want to include comma to value part, use `\\,` to escape it, for example (with percentage encoding): +`data_attrs=naam__icontains__Advies%%5C, support en kennis` """ ) % {"operator_choices": display_choice_values_for_help_text(Operators)}, diff --git a/src/objects/api/v2/openapi.yaml b/src/objects/api/v2/openapi.yaml index a3274cbd..d0787354 100644 --- a/src/objects/api/v2/openapi.yaml +++ b/src/objects/api/v2/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: Objects API - version: 2.4.3 (v2) + version: 2.4.3 description: | An API to manage Objects. @@ -114,6 +114,9 @@ paths: Example: in order to display only objects with `height` equal to 100, query `data_attrs=height__exact__100` should be used. If `height` is nested inside `dimensions` attribute, query should look like `data_attrs=dimensions__height__exact__100` + + If you want to include comma to value part, use `\,` to escape it, for example (with percentage encoding): + `data_attrs=naam__icontains__Advies%5C, support en kennis` - in: query name: data_icontains schema: @@ -641,6 +644,9 @@ paths: Example: in order to display only objects with `height` equal to 100, query `data_attrs=height__exact__100` should be used. If `height` is nested inside `dimensions` attribute, query should look like `data_attrs=dimensions__height__exact__100` + + If you want to include comma to value part, use `\,` to escape it, for example (with percentage encoding): + `data_attrs=naam__icontains__Advies%5C, support en kennis` date: type: string format: date