[JAVA] Generating code is referencing a generated model class which is not created
Created by: Morac2
Description
Generating Java code from a YAML file is creating code that imports and uses a model class that is never being generated. In this case there are references to org.openapitools.client.model.DocumentCreateWithStreamRequest and org.openapitools.client.model.DocumentUpdateWithStreamRequest classes, but that model class is never created. The code does generate DocumentCreateRequest and DocumentUpdateRequest classes, but the code never uses them. It instead replaces them with their parent class Document. All 4 classes extend Document.
In addition the generated code doesn't check to see if any of the required fields are present. Basically the generated code doesn't even compile, let alone work correctly.
openapi-generator version
All versions from 3.0.2 to 4.0.0-SNAPSHOT (didn't test earlier versions)
OpenAPI declaration file content or url
Command line used for generation
java -jar openapi-generator-cli.jar generate -l java -i test.yaml -o test_code
Steps to reproduce
Generate code
Related issues/PRs
N/A
Suggest a fix/enhancement
Unknown