-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[Core] oneOf schema properties #4515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This other pr also attempts to fix this issue |
@spacether I see, the fix is also identical. And it comes with tests, nice. |
@lwlee2608 can you run your spec through an online validator? For example, using this spec:
You should see multiple errors in OpenAPI Generator's validation:
You've ticked the validation TODO item in the description, but my above minimal spec fails validation in the linked validator: |
@jimschubert The difference is |
full-blown original 3gpp schema file can be found here |
Should be fixed by #4482 |
Bug Report Checklist
Description
vars
missing frommodel
if they are givenoneOf
ruleopenapi-generator version
4.2.2-SNAPSHOT
OpenAPI declaration file content or url
Steps to reproduce
checkout from here
./run.sh
The generated code won't compile because
Area
is missing propertiestacs
andareaCode
Suggest a fix
call
addVars
fromschema.properties
herehttps://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java#L1939
The text was updated successfully, but these errors were encountered: