generate GET and HEAD method calls
fjakop opened this issue · 0 comments
fjakop commented
I have an endpoint which supports GET and HEAD methods (Spring RestController, GetMapping). When I generate the Typescript only GET method is generated.
/**
*/
async getTask(requestParameters: GetTaskRequest): Promise<UserTaskDto> {
const response = await this.getTaskRaw(requestParameters);
return await response.value();
}
/**
*/
async getTasksRaw(): Promise<runtime.ApiResponse<Array<UserTaskDto>>> {
const queryParameters: runtime.HTTPQuery = {};
const headerParameters: runtime.HTTPHeaders = {};
const response = await this.request({
path: `/api/usertask`,
method: 'GET',
headers: headerParameters,
query: queryParameters,
});
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserTaskDtoFromJSON));
}
How can I generate additional HEAD method?
I've tried to annotate the endpoint with @RequestMapping(method = {RequestMethod.GET, RequestMethod.HEAD}, ...)
but then the generator complains with operationId is repeated
.