AdoptOpenJDK / openjdk-api

DEPRECATED and replaced by of https://github.com/AdoptOpenJDK/openjdk-api-v3 - See README
https://api.adoptopenjdk.net/README
Apache License 2.0
15 stars 15 forks source link

Add support for multi-value query params #167

Closed ParkerM closed 5 years ago

ParkerM commented 5 years ago

Adds support for multi-value query strings such as ?os=linux&os=windows as described in #165. All query-able properties are supported except for release due to its varying response format.

I was planning on adding a snippet to the docs (and support for the comma-delimited query format if it's not too complicated), but wanted to go ahead and make this visible for review in the meantime due to its hefty changeset. Most of the changes consist of refactoring the way filters are called - please let me know if any of them come off as confusing or take creative liberties too far.

ParkerM commented 5 years ago

Doc snippet has been added. Comma-separated query values seem to not be split by default in expressjs, but the functionality could be implemented naively on the application side pretty easily if that's a deal breaker.
Current such requests will display an error message that reflect the value that was actually parsed:

GET /v2/info/releases/openjdk8?heap_size=large,normal
400 Bad Request
Unknown heap_size format "large,normal"
karianna commented 5 years ago

@gdams and @johnoliver over to you for a sanity check - I didn't want to just merge this as we auto deploy via the pipelines right?

johnoliver commented 5 years ago

Other than I am not sure why the jdk-11+28 test case was removed, looks good