/**
*
* @export
* @interface Model
*/
export interface Model {
/**
*
* @type {any}
* @memberof Model
*/
to?: any;
/**
*
* @type {any}
* @memberof Model
*/
from?: any;
/**
*
* @type {any}
* @memberof Model
*/
textType?: any;
/**
*
* @type {any}
* @memberof Model
*/
apiVersion?: any;
}
Swagger just obliterates the type here... 🤷, but at least the code is not invalid.
I'm not in control of the swagger/openapi definition file, so unfortunately I can't get it changed. Is there something else I can do short from manually fixing the generated file?
Describe the bug
I'm encountering a weird problem where property names with
-
a dash are not converted to camel case.Sample 1
Looking at a very basic yaml:
Gets converted to:
Typescript doesn't allow dashes in property names, but OpenAPI does (see the 'Components Object' section). The enum
api-version
is therefore invalid and cannot be used.Comparison: Testing with Swagger Codegen
When testing this with the swagger-codegen tool it converts the model to:
Sample 2
will result in:
Swagger just obliterates the type here... 🤷, but at least the code is not invalid.
I'm not in control of the swagger/openapi definition file, so unfortunately I can't get it changed. Is there something else I can do short from manually fixing the generated file?