Repository navigation
Custom query params (addtional functionality) - #38
SirtusKottus wants to merge 2 commits into
Conversation
… request in http) to allow using custom functionality in query params ( for example using query params which are not visible in schema or custom filtering )
|
Sometimes its useful to have query_params which are not validated with schema because even good documentation not always generates schema with all available query params. For example generic filtering for api |
|
Hey is any one going to approve this pull requests ?? :) |
|
Hey, this should be cool to have! |
|
Next thing which this will fix is using "ordering" is not visible in schema. DRF documantation about setting ordering EDIT: i have tested that with my version and it works. |
|
@tomchristie could you look at this ? |
|
For now I'd like to see folks approach this from the other side (ie. fix up the schema, so you don't need to include "extra" unknown query parameters in the client) |
|
@tomchristie Solution you're suggesting would be an overkill in many real-life cases. Either CoreAPI schema format schould be changed (to allow adding global parameters like pagination and filtering on a top level) or less strict client code issued. |
|
@tomchristie we started doing this in your way which was difficult because this part how to fix schema is poorly documented. After couple hours of searching I couldn't find solution to add page and page size to schema in custom @list_route. |
Added custom query params for action function in Client ( up to build request in http) to allow using custom functionality in query params ( for example using query params which are not visible in schema or custom filtering )