Strategies on documenting filter query format in OpenAPI spec #3102
Closed
geoff-maddock
started this conversation in
General
Replies: 2 comments 5 replies
-
Isn't it just a simple matter of /components:
parameters:
filter_parameters:
- name: filter_parameters # this name is arbitrary and not used anywhere
in: query
required: false
schema:
type: object
properties:
page:
type: integer
minimum: 1
results_per_page:
type: integer
minimum: 1
filters:
type: string
/paths:
/foo/{foo_id}/bar:
parameters:
- $ref: '#/components/parameters/filter_parameters'
... Do you mean that the format of the |
Beta Was this translation helpful? Give feedback.
5 replies
-
No follow-up from OP since 2022, closing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My team is working on an OpenAPI spec for a new API, and we're implementing a new filtering capacity for resources.
For example:
/entity?page=1&results_per_page=50&filters= column-a eq value-b, column-b neq value-b, column-c lte value-c
I'd like to be able to denote the available options for filters for ALL endpoints where filter is a possible query param, but not quite sure what the best approach would be, since the format is specific to filters.
Anyone have a suggestion or pattern for describing this?
Beta Was this translation helpful? Give feedback.
All reactions