I'm doing code generation with the open api generator tool to generate a typescript-axios client, but unfortunately there's a couple of issues I'm running into.
- There is a property in the open api doc we're generating from called
long. However, the interface it generates changes that property to_longwhich is not correct. I can't find anywhere in the mustache template that is doing this so it must be happening in the CLI layer. Can this behavior be prevented?
Swagger property definition:
"long": {
"type": "number",
"description": "The longitude location.",
"format": "double",
"nullable": true
}
Codegen interface property output:
/**
* The longitude location.
* @type {number}
* @memberof ...
*/
_long?: number | null;
- Dates are passed as strings to the API and are defined as such in the open api doc, but it seems when they have a
date-timeformat, the interface says it requires aDateobject. This is not ideal in our situation, but again this appears to happen at the CLI level so I can't prevent this behavior by modifying the mustache template.
Swagger property definition:
"startDate": {
"type": "string",
"description": "Gets or sets the start date of the search date range.",
"format": "date-time",
"nullable": true
},
Codegen interface property output:
/**
* Gets or sets the start date of the search date range.
* @type {Date}
* @memberof ...
*/
startDate?: Date | null;
Thanks in advance for any help!