APIv3: Support filter paramters passed via filter_parameters array #8253
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This contains two commits:
The first adds support for accepting filter parameters via the
filter_parameters
query argument. This makes it possible to actually pass filter parameters as described in the Swagger definition. The old behavior of passing filter parameters via arguments not explicitly named in the Swagger definition is preserved.e.g.
filter_parameters=date$gt%3D1491719030000
==date$gt=1491719030000
The second commit makes it explicit in the Swagger definition that
filter_parameters
is an array of string arguments. The JSON definition was generated from the YAML definition (java -jar openapi-generator-cli-7.4.0.jar generate -i cgm-remote-monitor/lib/api3/swagger.yaml -g openapi --skip-validate-spec
).If someone knows of a way to generate the JSON that results in less churn (other than modifying it by hand...) I would gladly redo that commit.
This assumes #8252 has been merged.
The API version should probably be incremented after accepting #8252, this, or both.