Skip to content

Commit

Permalink
📝 [#472] update description of 'data_attrs' query param in the OAS
Browse files Browse the repository at this point in the history
  • Loading branch information
annashamray committed Dec 9, 2024
1 parent 8925729 commit b07f433
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/objects/api/v2/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)},
Expand Down
8 changes: 7 additions & 1 deletion src/objects/api/v2/openapi.yaml
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b07f433

Please sign in to comment.