Open cihadaydemir opened 2 years ago
UPDATE: I fixed the optional attributes part of my problem. The problem was that i forgot to include the springdoc-openapi-kotlin depedancy in my spring boot backend, so it couldn't really recognize which of my DTO's attributes are required and not. But i still have the problem, that all of my attributes are enquoted.
FYI, it was added to support special characters in property names. https://github.com/OpenAPITools/openapi-generator/pull/10447
What's the problem with extra quotes ? It is a regular javascript/typescript code.
Description
When i use the 'typescript-axios' generator, every attribute of all my models are enquoted and optional. I tried it out with the 'typescript-rxjs' generator, with this the quotes disappeared but all of my attributes still were optional.
openapi-generator version
Version: 6.0.1
Generation Details
My config file looks like this:
{ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { "version": "6.0.1", "generators": { "axios": { "generatorName": "typescript-axios", "output": "src/proxy", "inputSpec": "http://localhost:8080/v3/api-docs.yaml", "additionalProperties": { "supportsES6": true, "withSeparateModelsAndApi": true, "apiPackage": "api", "modelPackage": "model", "useSingleRequestParameter": true, "enumPropertyNaming": "original" } } } } }
The OpenApi specification:
My generated result:
Expected result: