Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Index Schema Field Filtering (#202)
* new parameters and schemas added for field based filtering Signed-off-by: Michael Valdron <mvaldron@redhat.com> * new types and endpoint signatures to support additional filter parameters Signed-off-by: Michael Valdron <mvaldron@redhat.com> * setmap collection type and test cases defined Signed-off-by: Michael Valdron <mvaldron@redhat.com> * multi field filtering changes Signed-off-by: Michael Valdron <mvaldron@redhat.com> * setmap changes dynamic typing and union Signed-off-by: Michael Valdron <mvaldron@redhat.com> * AndFilter and FilterResult Signed-off-by: Michael Valdron <mvaldron@redhat.com> * filters use lazy evaluation Signed-off-by: Michael Valdron <mvaldron@redhat.com> * StructToMap function Signed-off-by: Michael Valdron <mvaldron@redhat.com> * replace setmap (using built-in map) with hashicorp hashset data structure Signed-off-by: Michael Valdron <mvaldron@redhat.com> * revert schema changes Signed-off-by: Michael Valdron <mvaldron@redhat.com> * use fields instead of reverted getter functions Signed-off-by: Michael Valdron <mvaldron@redhat.com> * array fuzzy filter & filter options Signed-off-by: Michael Valdron <mvaldron@redhat.com> * attribute names field test cases Signed-off-by: Michael Valdron <mvaldron@redhat.com> * simplify type signatures under filter.go Signed-off-by: Michael Valdron <mvaldron@redhat.com> * filter resources test cases Signed-off-by: Michael Valdron <mvaldron@redhat.com> * fix filterDevfileArrayFuzzy to consider version schema results before filtering out index schema entry Signed-off-by: Michael Valdron <mvaldron@redhat.com> * filter by starter projects test cases Signed-off-by: Michael Valdron <mvaldron@redhat.com> * filter by link names test cases Signed-off-by: Michael Valdron <mvaldron@redhat.com> * fix link getters to return the link label rather than the link itself Signed-off-by: Michael Valdron <mvaldron@redhat.com> * filter by command groups test cases Signed-off-by: Michael Valdron <mvaldron@redhat.com> * filter by git remote names test cases Signed-off-by: Michael Valdron <mvaldron@redhat.com> * add missing string field filter test case definitions Signed-off-by: Michael Valdron <mvaldron@redhat.com> * Parameter label sets and getters Signed-off-by: Michael Valdron <mvaldron@redhat.com> * filter index parameters Signed-off-by: Michael Valdron <mvaldron@redhat.com> * fix icon parameter conflict Signed-off-by: Michael Valdron <mvaldron@redhat.com> * revert error returns for FilterDevfileSchemaVersion Signed-off-by: Michael Valdron <mvaldron@redhat.com> * add iconUri field to IndexParams Signed-off-by: Michael Valdron <mvaldron@redhat.com> * add filter result name field and return error if eval fails Signed-off-by: Michael Valdron <mvaldron@redhat.com> * only perform field filtering with IndexParams tied to a field Signed-off-by: Michael Valdron <mvaldron@redhat.com> * fix version regex in openapi spec Signed-off-by: Michael Valdron <mvaldron@redhat.com> * '/v2index/all?arch=arm64&language=java' call integration test case Signed-off-by: Michael Valdron <mvaldron@redhat.com> * REST doc update Signed-off-by: Michael Valdron <mvaldron@redhat.com> * update generated source from doc changes Signed-off-by: Michael Valdron <mvaldron@redhat.com> * remove minSchemaVersion and maxSchemaVersion from v1 param conversion Signed-off-by: Michael Valdron <mvaldron@redhat.com> * fix k8s.io/utils as direct dependency Signed-off-by: Michael Valdron <mvaldron@redhat.com> * method not allowed query params removed Signed-off-by: Michael Valdron <mvaldron@redhat.com> * string pointer set check function Signed-off-by: Michael Valdron <mvaldron@redhat.com> * minVersion & maxVersion filtering with range filtering & unit test fixups Signed-off-by: Michael Valdron <mvaldron@redhat.com> * add missing schema version range filters to devfile endpoints Signed-off-by: Michael Valdron <mvaldron@redhat.com> * remove fuzzy sets and punctuation removal Signed-off-by: Michael Valdron <mvaldron@redhat.com> * /v2index?minVersion=1.1&maxVersion=1.1 integration test cases added Signed-off-by: Michael Valdron <mvaldron@redhat.com> * /index?provider=Red%22Hat&resources=.zip integrartion test case added Signed-off-by: Michael Valdron <mvaldron@redhat.com> * skip new test cases outside test registry Signed-off-by: Michael Valdron <mvaldron@redhat.com> * /index/sample?description=Hello%22World integration test case added Signed-off-by: Michael Valdron <mvaldron@redhat.com> * /index/all?description=node integration test case added Signed-off-by: Michael Valdron <mvaldron@redhat.com> * /v2index?name=java&default=true integration test case added Signed-off-by: Michael Valdron <mvaldron@redhat.com> * /v2index/sample?description=java&default=true integration test case added Signed-off-by: Michael Valdron <mvaldron@redhat.com> * /v2index/all?description=java&default=true integration test case added Signed-off-by: Michael Valdron <mvaldron@redhat.com> * remove lazy eval from FilterResult Signed-off-by: Michael Valdron <mvaldron@redhat.com> * remove unused MakeMockFilterResult Signed-off-by: Michael Valdron <mvaldron@redhat.com> * AndFilter params by ref instead of by value Signed-off-by: Michael Valdron <mvaldron@redhat.com> * add deprecated query param Signed-off-by: Michael Valdron <mvaldron@redhat.com> * add FilterDevfileDeprecated filter function and test cases Signed-off-by: Michael Valdron <mvaldron@redhat.com> * update test stacks to test against deprecated parameter Signed-off-by: Michael Valdron <mvaldron@redhat.com> * update build index to filter based on deprecated stacks if deprecated parameter is set Signed-off-by: Michael Valdron <mvaldron@redhat.com> * integration test cases for deprecated filter parameter Signed-off-by: Michael Valdron <mvaldron@redhat.com> --------- Signed-off-by: Michael Valdron <mvaldron@redhat.com>
- Loading branch information