swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
Compiling the following yaml into a TypeScript-Fetch client results in an interface with an incorrect type.
Specifically when the additionalProperties is set to true.
So in this case if I'm not passing additionalProperties flag the interface i.e. getting generated for requestBody is Interface1 else it is Interface2.
But I'm looking for a combination that incorporates elements from both the interfaces.
Description
Compiling the following yaml into a TypeScript-Fetch client results in an interface with an incorrect type. Specifically when the
additionalProperties
is set to true.Swagger-codegen version
SWAGGER_VERSION=3.0.55
Swagger declaration file content or url
Following is an example sample yaml file
For an example let's say we have 2 interfaces
So in this case if I'm not passing
additionalProperties
flag the interface i.e. getting generated forrequestBody
isInterface1
else it isInterface2
. But I'm looking for a combination that incorporates elements from both the interfaces.Command line used for generation
java -jar ./swagger-codegen-cli.jar generate -i ./server/out/example.yaml -l typescript-axios -o ./server/out/api-client --additional-properties modelPropertyNaming=original enumPropertyNaming=original
Steps to reproduce
Compile a swagger API containing the definitions mentioned above into a typescript-fetch client.
Suggest a fix/enhancement
I'm looking for a combination that incorporates elements from both the interfaces.