PostgREST / postgrest

REST API for any Postgres database
https://postgrest.org
MIT License
22.65k stars 1k forks source link

Expose filter fields in swagger/openapi schema #2026

Open bkniffler opened 2 years ago

bkniffler commented 2 years ago

Description of issue

Swagger definitions do not have any info about filters. Is there any way to include them? I know we can link to Postgrest docs, but when using something like swagger ui, people have no way to filter while tinkering with the API.

Bildschirmfoto 2021-11-17 um 20 26 10
wolfgangwalther commented 2 years ago

As mentioned here, if we were to change our operators to col.op=val instead of col=op.val, we could make things easier for swagger ui. On top of that, we could expose all the filters for each column in the openapi parameters list. So instead of rowFilters.table.column, we would have rowFilters.table.column.op etc.