I have a model called category and another model called Type, the category belongTo a Type.
I wanted to query the categories of a certain type.
The generated sdk have the following api:
/**
Queries categories of Type.
@param {any} id Category id
@param {object} filter
@returns {object[]} An empty reference that will be
populated with the actual data once the response is returned
from the server.
(The remote method definition does not provide any description.
This usually means the response is a Category object.)
*/
public getTypeCategories(id: any, filter: LoopBackFilter = {}, customHeaders?: Function): Observable {
let _method: string = "GET";
let _url: string = LoopBackConfig.getPath() + "/" + LoopBackConfig.getApiVersion() +
"/Categories/:id/type/categories";
let _routeParams: any = {
id: id
};
let _postBody: any = {};
let _urlParams: any = {};
if (typeof filter !== 'undefined' && filter !== null) _urlParams.filter = filter;
let result = this.request(_method, _url, _routeParams, _urlParams, _postBody, null, customHeaders);
return result;
}
This api, which what I need, ask for a categoryId which doesn't make sense, like how this api is supposed to query the categories of certain type as it says "Queries categories of Type." and it asks for a categoyId
What type of issue are you creating?
What version of this module are you using?
Write other if any:
I have a model called category and another model called Type, the category belongTo a Type. I wanted to query the categories of a certain type. The generated sdk have the following api:
/**
Category
object.)This api, which what I need, ask for a categoryId which doesn't make sense, like how this api is supposed to query the categories of certain type as it says "Queries categories of Type." and it asks for a categoyId