Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][typescript-axios] Interfaces properties are quoted #20167

Open
itbro2 opened this issue Nov 23, 2024 · 0 comments
Open

[BUG][typescript-axios] Interfaces properties are quoted #20167

itbro2 opened this issue Nov 23, 2024 · 0 comments

Comments

@itbro2
Copy link

itbro2 commented Nov 23, 2024

Description

Hi, I am generating a client using typescript-axios generator and in models, all the fields are wrapped into quotes and I can't turn it off. It is not a problem, until a field name contains some enum constant, because in this case it is escaped. When I am adding an option queryParamObjectFormat=key, it does nothing.

This is an example how a generated interface looks like:

export interface Pet {
   'name': string;
   'category'?: Category;
   '[MyEnum.A]': string;
   ...
}

But I expect it to look like this:

export interface Pet {
   name: string;
   category?: Category;
   [MyEnum.A]: string;
   ...
}
openapi-generator version

7.9.0

Generation Details
java -jar openapi-generator-cli.jar generate -i openapi.yaml -g typescript-axios -o generated/api --additional-properties=queryParamObjectFormat=key,apiPackage==api,modelPackage=models,withSeparateModelsAndApi=true,stringEnums=true --api-name-suffix=ApiService
@itbro2 itbro2 changed the title [BUG][typescript-axios] Interfaces fields names are wrapped into quotes [BUG][typescript-axios] Interfaces properties are wrapped into quotes Nov 23, 2024
@itbro2 itbro2 changed the title [BUG][typescript-axios] Interfaces properties are wrapped into quotes [BUG][typescript-axios] Interfaces properties are quoted Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant