SMILEY4 / ktor-swagger-ui

Kotlin Ktor plugin to generate OpenAPI and provide Swagger UI
Apache License 2.0
180 stars 33 forks source link

missing type: string for enum types #125

Closed tobyworks closed 1 month ago

tobyworks commented 3 months ago

the openapi spec is missing type: string for enum types. this causes generators like orval to generate faulty code.

image
SMILEY4 commented 3 months ago

Hi, i'm not 100% sure i am understanding the issue correctly. Could you perhaps provide a model and openapi spec showcasing the problematic/desired behavior ?

rmcmk commented 1 month ago

Hi, i'm not 100% sure i am understanding the issue correctly. Could you perhaps provide a model and openapi spec showcasing the problematic/desired behavior ?

Should be fixed by #137 once those kinks are ironed out. Same issue. Type is being stripped resulting in code generators/the UI showing the type as "unknown" or "any".

See: https://swagger.io/docs/specification/v3_0/data-models/enums/