[BUG] Invalid warning about inline schema usage in allOf
Created by: typhoon2k
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
Generator is logging More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored.
warning, when generating Java, C# or TypeScript code from schema that is using allOf without discriminator and with more than 2 referenced schemas.
openapi-generator version
4.3.x, 5.0.0
OpenAPI declaration file content or url
Example file allOf_composition.yaml can be used to repeat this problem (schema SuperMan). We have a use case that has 3 refs (and no inline schemas at all), which leads to the same warning.
Generation Details
java \
-jar openapi-generator-cli-5.0.0-beta.jar \
generate \
--input-spec $input_file \
--generator-name typescript-axios \
--output $output_folder
Steps to reproduce
- run generator
- check logs
Related issues/PRs
There are issues, which are discussing invalid inheritance/composition support and it seems that all of them are fixed now. In our case generated code is correct (Java/C#/TypeScript) and all fields are there; it's a warning that is wrong.
Suggest a fix
Remove obsolete warning?