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
What's the actual output vs expected output? No models generated vs models generated
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Running java -jar openapi-generator-cli.jar generate -i 'swagger.json' -g scala-akka -o scala_client --generate-alias-as-model (also without config and/or without --generate-alias-as-model), doesn't produce any model libs.
Removing "additionalProperties": false, from the inline schema def makes it generate model classes. What also works is to define the schema using definitions + "$ref" : "..." - but that's not really feasible with the library I'm using for my server.
openapi-generator version
5.0.1 and also tested with openapi-generator-cli-5.1.0-20210304.083949-99.jar
Just run java -jar openapi-generator-cli.jar generate -i 'swagger.json' -g scala-akka -o scala_client where swagger.json is the file I linked above, and the jar is either 5.0.1 or the snapshot version I mentioned.
Related issues/PRs
X
Suggest a fix
Somehow removing "additionalProperties": false, from the inline schema def makes it generate model classes. Setting it to true doesn't help either (not sure true is valid though). Referencing it with "$ref": "..." and moving the schema to definitions also solves this (but I can't use that solution due to the. lib I'm using).
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
Running
java -jar openapi-generator-cli.jar generate -i 'swagger.json' -g scala-akka -o scala_client --generate-alias-as-model
(also without config and/or without--generate-alias-as-model
), doesn't produce any model libs.Removing
"additionalProperties": false,
from the inline schema def makes it generate model classes. What also works is to define the schema usingdefinitions
+"$ref" : "..."
- but that's not really feasible with the library I'm using for my server.openapi-generator version
5.0.1 and also tested with
openapi-generator-cli-5.1.0-20210304.083949-99.jar
OpenAPI declaration file content or url
swagger.json gist
Generation Details
X
Steps to reproduce
Just run
java -jar openapi-generator-cli.jar generate -i 'swagger.json' -g scala-akka -o scala_client
where swagger.json is the file I linked above, and the jar is either 5.0.1 or the snapshot version I mentioned.Related issues/PRs
X
Suggest a fix
Somehow removing
"additionalProperties": false,
from the inline schema def makes it generate model classes. Setting it totrue
doesn't help either (not suretrue
is valid though). Referencing it with"$ref": "..."
and moving the schema todefinitions
also solves this (but I can't use that solution due to the. lib I'm using).The text was updated successfully, but these errors were encountered: