[TypeScript] Free-Form object being generated incorrectly
Description
I'm trying to generate the typescript models, based on the schemas defined in the YAML file, but there is a model (free-form object) that is not being properly generated and the typescript is generated like
export interface MyModel extends null<String, any> {
[key: string]: any;
}
while I was expecting something like:
export interface MylModel {
[key: string]: any;
}
Is relevant to mention that this problem started happening after the migration from Swagger 2.x version to OpenAPI 3.0 and i also started using this new Swagger-codegen version
Swagger-codegen version
3.0.11
Swagger declaration file content or url
components:
schemas:
MyModel:
type: object
additionalProperties:
type: object
example:
Sheet 1!A1: 0
Sheet 1!A2: a text
Command line used for generation
mvn clean generate-resources
Steps to reproduce
Using a valid open API 3.0 YAML file, declare the schema referred above and generate the typescript model using the following pom configuration:
<plugin>
<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<version>${swagger-codegen-maven-plugin.version}</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${basedir}/../schema/api.yaml</inputSpec>
<output>${basedir}/src/app/shared/api</output>
<language>typescript-angular</language>
<generateApis>false</generateApis>
<generateSupportingFiles>true</generateSupportingFiles>
<generateModelDocumentation>false</generateModelDocumentation>
<generateModelTests>false</generateModelTests>
<generateSupportingFiles>false</generateSupportingFiles>
<generateAliasAsModel>true</generateAliasAsModel>
<modelPackage>models</modelPackage>
</configuration>
</execution>
</executions>
</plugin>
Related issues/PRs
Suggest a fix/enhancement
We have the same issue. +1
Any update on this team??
Same issue with 3.0.25
The same problem
Can't use this library because of this issue.
same issue with openapi-generator-cli 7.4.0