Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why /<resource_name>/schema execute Resource.get_object_list(request)? #1246

Closed
geovanisouza92 opened this issue Oct 31, 2014 · 2 comments
Closed

Comments

@geovanisouza92
Copy link

Hello everyone!

Why /<resource_name>/schema execute Resource.get_object_list(request)? Is by design or just the sequence of call chain?

I ask this because some of my resources receive some parameters via GET (?param1=value&param2=value ...) and always I test the /schema path, it ask me for that params (I validate them on get_object_list()).

@hneiva
Copy link

hneiva commented Nov 13, 2014

Have you tried returning an empty queryset when those values are not provided?

@geovanisouza92
Copy link
Author

Hi @hneiva, thank you for reply.

I tried now, and this workaround worked fine. Thank you.

Anyway, there is a way to introspect the /schema without passing the Resource call chain? Maybe looking only on Resource fields, Resource.Meta.queryset or Resource.Meta.object_class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants