-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Description
When generating classes for TypeScript Angular, if a field name has a leading @ character, it is stripped.
We have these @ characters because we wanted to follow a TM Forum API Design guideline (which has these @referredType fields).
openapi-generator version
Tested with 4.3.1 and 5.0.0-beta3
OpenAPI declaration file content or url
When parsing this yaml: https://gist.github.com/clementcontet/2eaa131ec7a39c73729474508d0ca6f8#file-test-swagger-yaml
I get this generated class:
import { ProductOfferingType } from './productOfferingType';
export interface ProductOfferingRef {
id: string;
referredType: ProductOfferingType;
}
Generation Details
I use this config file:
{
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "5.0.0-beta3",
"generators": {
"v2.0": {
"generatorName": "typescript-angular",
"output": "build",
"glob": "swagger/swagger.yaml",
"additionalProperties": {
"ngVersion": "11.0.0",
"configurationPrefix": "enov"
}
}
}
}
}
Reactions are currently unavailable