Open
Description
Description
I want to write an API in OpenAPI so that the generated API function can return JSON response in UTF8 encoding.
but it only returns in string_t wide string.
i check the C++ code definition of the generated function :
The generated function returns wstring by web::http::http_response.extract_string( )
But instead i want to return std:string using web::http::http_response.extract_utf8string();
I know that there is a cpp-restsdk library function conversions::to_utf8string( ) to convert wide string to std::string.
but i want to skip such data conversion function when I can directly get data in actual UTF8 using extract_utf8string.
openapi-generator version 4.3.1
OpenAPI declaration file content or url
/api/v1/user/items:
get:
tags:
- test
summary: Get list.
description: Returns list.
operationId: getList
responses:
'200':
description: Returns JSON array.
content:
application/json:
schema:
type: array
items:
type: string
Command line used for generation
npx @openapitools/openapi-generator-cli generate -i test.yaml -g cpp-restsdk -o %CD%