Bug Report Checklist
Description
The following schema generates a JavaScript Set property:
{
"Test": {
"required": [
"a"
],
"type": "object",
"properties": {
"a": {
"uniqueItems": true,
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
Generated object:
export interface Test {
/**
*
* @type {Set<string>}
* @memberof Test
*/
'a': Set<string>;
}
However when sending this request to the server, the value is not de-serialized as an array but just replaced with an empty object ("a":{}).
Similarly, when inspecting the returned data from an API, the actual values on the JavaScript object are not wrapped in a set, but return as an array.
openapi-generator version
4.5.0
Suggest a fix
Either don't generate Set and use a T[] or add conversions for sending and receiving sets
Bug Report Checklist
Description
The following schema generates a JavaScript Set property:
{ "Test": { "required": [ "a" ], "type": "object", "properties": { "a": { "uniqueItems": true, "type": "array", "items": { "type": "string" } } } } }Generated object:
However when sending this request to the server, the value is not de-serialized as an array but just replaced with an empty object ("a":{}).
Similarly, when inspecting the returned data from an API, the actual values on the JavaScript object are not wrapped in a set, but return as an array.
openapi-generator version
4.5.0
Suggest a fix
Either don't generate Set and use a T[] or add conversions for sending and receiving sets