Skip to content
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

generate correct schema if parent class has only a single child #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Fox32
Copy link

@Fox32 Fox32 commented Jun 19, 2020

Parent classes that only have a single child (e.g. because they are open for extension, but not yet have more children) are generating a wrong schema. The emitted oneOf element has only a single $ref, which is not valid. It needs at least two array elements. This is changed, so that oneOf is only emitted if more than one child is available.

@mbknor Right now we have a workaround using @JsonSchemaInject but it would be cool to see this fixed.

Parent classes that only have a single child (e.g. because they are open for extension, but not yet have more childs) are generating a wrong schema. The emitted oneOf element has only a single $ref, which is not valid. It needs at least two array elements. This is changed, so that oneOf is only emitted if more than one child is available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant