forked from katharsis-project/katharsis-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Getting Katharsis to adhere to the Json api specification for query
parameters katharsis-project#4 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. Still todo: -Implement jsonapi-compliant parser -Add unit tests for parsers/contexts -Remove QueryParamsBuilder -Update existing unit tests -Test servlet/jax-rs implementations
- Loading branch information
1 parent
938ef3d
commit 1772023
Showing
16 changed files
with
621 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
katharsis-core/src/main/java/io/katharsis/queryParams/JsonApiQueryParamsParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.katharsis.queryParams; | ||
|
||
import io.katharsis.queryParams.context.QueryParamsParserContext; | ||
import io.katharsis.queryParams.params.IncludedFieldsParams; | ||
import io.katharsis.queryParams.params.IncludedRelationsParams; | ||
import io.katharsis.queryParams.params.SortingParams; | ||
import io.katharsis.queryParams.params.TypedParams; | ||
|
||
import java.util.Collections; | ||
|
||
/** | ||
* | ||
*/ | ||
public class JsonApiQueryParamsParser extends DefaultQueryParamsParser { | ||
|
||
//TODO: implement methods which adhere to official json-api spec | ||
protected TypedParams<SortingParams> parseSortingParameters(final QueryParamsParserContext context) { | ||
throw new UnsupportedOperationException("Not implemented"); | ||
} | ||
|
||
protected TypedParams<IncludedFieldsParams> parseIncludedFieldsParameters(final QueryParamsParserContext context) { | ||
throw new UnsupportedOperationException("Not implemented"); | ||
} | ||
|
||
protected TypedParams<IncludedRelationsParams> parseIncludedRelationsParameters(QueryParamsParserContext context) { | ||
throw new UnsupportedOperationException("Not implemented"); | ||
} | ||
} |
Oops, something went wrong.