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

Request argument schema #257

Open
multimeric opened this issue Sep 30, 2019 · 0 comments · May be fixed by #258
Open

Request argument schema #257

multimeric opened this issue Sep 30, 2019 · 0 comments · May be fixed by #258

Comments

@multimeric
Copy link

The JSON API spec outlines a few (optional) query parameters for the requests:

  • include, which determines which related resources should be included
  • fields[TYPE] which includes or excludes fields from the response schema
  • sort, which controls sorting the response
  • page, which controls the amount of items per page and the index of the page
  • filter, which filters the response data

Now obviously marsmallow-jsonapi can't handle the logic for all this, but it seems reasonable that this library could supply some validation. The associated Webargs project seems ideal for this.

For example, we could provide an abstract parent schema for GET query parameters, which users can inherit from, which apply some of the JSON API recommendations for these parameters.

Would this be in the scope of this project? I might have time to write a PR for this. But I wanted to sound this out first.

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