Open emmercm opened 3 years ago
Faced this issue while using swagger-codegen-cli-3.0.24.jar
. However, when the same JSON / YAML is fed to https://editor.swagger.io/, the output shows examples correctly even though it internally uses codegen. Maybe it has its own additional implementation.
Description
When generating
language = html2
with the below example, the response schema gets rendered as:But this should be supported per: https://swagger.io/docs/specification/adding-examples/#schemas
Swagger-codegen version
v3.0.14 - v3.0.23
Swagger declaration file content or url
Command line used for generation
The Maven plugin: https://mvnrepository.com/artifact/io.swagger.codegen.v3/swagger-codegen-maven-plugin
Steps to reproduce
See above.
Related issues/PRs
Possibly https://github.com/swagger-api/swagger-codegen/issues/4896.
Suggest a fix/enhancement
The example could instead be rendered similar to: