You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When generator a client from a schema with a schema object named Timestamp invalid Kotlin code is generated.
data classjava.sql.Timestamp (
/* Milliseconds since the Unix epoch */
@get:JsonProperty("epochMillis")
valepochMillis: kotlin.String
)
The generator seems to be blindly using java.sql.Timestamp as the {{classname}} in template rendering even though it is defined as a custom schema.
openapi-generator version
7.12
OpenAPI declaration file content or url
info:
title: OpenAPI definitionversion: v0paths: {}openapi: 3.0.1servers:
- url: http://localhost:8080description: Generated server urlcomponents:
schemas:
Timestamp:
type: objectrequired:
- epochMillisproperties:
epochMillis:
type: stringexample: '1481899949606'description: Milliseconds since the Unix epochdescription: A timestamp object representing a point on the ISO timeline in milliseconds since the Unix epoch.
Generate the schema above using the openapi-generator config above
chmod +x gradlew
./gradlew compileKotlin
Related issues/PRs
Suggest a fix
The issue appears to be that the CodegenModel's classname is being set to java.sql.Timestamp even though it should not.
I believe the fix should probably prevent that implicate behavior if the model is defined in the components.schemas.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
When generator a client from a schema with a schema object named
Timestamp
invalid Kotlin code is generated.The generator seems to be blindly using
java.sql.Timestamp
as the{{classname}}
in template rendering even though it is defined as a custom schema.openapi-generator version
7.12
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
chmod +x gradlew
./gradlew compileKotlin
Related issues/PRs
Suggest a fix
The issue appears to be that the CodegenModel's
classname
is being set tojava.sql.Timestamp
even though it should not.I believe the fix should probably prevent that implicate behavior if the model is defined in the
components.schemas
.The text was updated successfully, but these errors were encountered: