alfresco-js-api icon indicating copy to clipboard operation
alfresco-js-api copied to clipboard

Typo in `query` -> `queries` property of RequestFilterQueriesInner class

Open yherasymchukarchitech opened this issue 5 years ago • 3 comments

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:

yherasymchukarchitech avatar Jun 19 '20 12:06 yherasymchukarchitech

I will create PR in a while, just wanted to confirm if the idea is correct

yherasymchukarchitech avatar Jun 19 '20 12:06 yherasymchukarchitech

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 avatar Jun 19 '20 12:06 DenysVuika

@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.

yherasymchukarchitech avatar Jun 19 '20 14:06 yherasymchukarchitech

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"}]

DenysVuika avatar Aug 12 '23 17:08 DenysVuika