alfresco-js-api
alfresco-js-api copied to clipboard
Typo in `query` -> `queries` property of RequestFilterQueriesInner class
Type of issue: (check with "[x]")
- [ ] New feature request
- [x] Bug
- [ ] Support request
Current behavior:
Class RequestFilterQueriesInner has property query?
https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/search-rest-api/model/requestFilterQueriesInner.ts#L24
export class RequestFilterQueriesInner {
/**
* The filter query expression.
For multi-select facets selected facets must be order together
*/
query?: string;
/**
* Tags used exclude the filters from facet evaluation for multi-select facet support
*/
tags?: string[];
constructor(input?: any) {
if (input) {
Object.assign(this, input);
}
}
}
Expected behavior:
In the documentation, we have in the table also property query but in fact, in the example section it's a property queries and works correctly.
https://docs.alfresco.com/6.1/concepts/search-api-filterQueries.html
Steps to reproduce the issue:
Node version (for build issues):
New feature request:
I will create PR in a while, just wanted to confirm if the idea is correct
I think the example in the docs does not reflect the API, and we are using search api in the ADF and ADF-based apps with the current implementation (as in the Parameters). I will clarify and update this ticket.
@DenysVuika but as I said, API works exactly as "Example" section in docs ( it expects queries property); model and table section in docs don't reflect the API.
closing as the api is generated from the swagger and is expected to be "query": https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Search%20API#/search/search
"filterQueries": [{"query": "TYPE:'cm:folder'"},{"query": "cm:creator:mjackson"}]