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

Enhancement: Add ability for katharsis to parse query parameters that adhere to the JSON-API specification #113

Closed
dustinstanley opened this issue Sep 6, 2016 · 0 comments

Comments

@dustinstanley
Copy link

dustinstanley commented Sep 6, 2016

This was discussed in #4, however that issue ended up turning into a larger discussion that included additional refactoring work and wasn't solely about adhering to the JSON-API spec. This new issue is to address the JSON-API compliance specifically.

In the previous discussion, we talked about making the following changes for JSON-API compliance:
-Refactoring QueryParamsParser to return QueryParams directly, using a new QueryParamsParserContext
-An implementation of QueryParamsParserContext would be created for each integration (servlet, jax-rs, spring). The context would extract the query parameter information from the request, allowing QueryParamsParsers to build QueryParams
-We would keep the DefaultQueryParamsParser as before, and add a new JsonApiQueryParamsParser that can optionally be used which more closely adheres to the JSON-API specification.

To that end, I have created the following commit which addresses most of these items here: dustinstanley@6dfc47b

Please let me know if you have any feedback or comments.

One thing I am not sure about is if we want to keep or remove QueryParamsBuilder. After these changes, QueryParamsBuilder doesn't really have much responsibility any more. But, if we decide down the road that we want to split the query params parsing logic down further (separate parsers for each type of query parameter perhaps) then the builder could still be useful.

@remmeier @meshuga @masterspambot

dustinstanley added a commit to dustinstanley/katharsis-framework that referenced this issue Sep 8, 2016
parameters katharsis-project#113

Simplify/enhance the QueryParamsParser interface by utilizing a context object
to supply the parser with the raw query parameter information from the request, as
well as a reference to the ResourceInformation of the requested resource.
remmeier added a commit that referenced this issue Sep 10, 2016
that adhere to the JSON-API specification 

- introduction of QueryAdapter which allows more flexible handling of
different query implementation (QueryParams, QuerySpec)
- QuerySpec support for katharsis-client
- Serializer/Deserializer for QuerySpec that adhere to json api
specification. QueryParams still default implementation used to parse
incoming requests, further fixes in this area still needed because of
that.
remmeier added a commit that referenced this issue Sep 10, 2016
remmeier added a commit that referenced this issue Sep 10, 2016
…to the JSON-API

- introduction of QueryAdapter which allows more flexible handling of
different query implementation (QueryParams, QuerySpec)
- QuerySpec support for katharsis-client
- Serializer/Deserializer for QuerySpec that adhere to json api
specification (multi column sort). QueryParams still default implementation used to parse
incoming requests, further fixes in this area still needed because of
that.
- QuerySpecResourceRepository interface introduce. Managed by ResourceRepositoryAdapter directly (instead of wrapping a QueryParams repository). Deprecated old wrappers.
remmeier added a commit that referenced this issue Oct 10, 2016
e.g.
- filter[attrName]=value
- include=relationAttrName
remmeier added a commit that referenced this issue Oct 26, 2016
added support to sort by multiple attributes
remmeier added a commit that referenced this issue Oct 26, 2016
#113: json api compliant parameter handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants