Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- 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
OpenAPI declaration file content or url
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 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).