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

set schema name for EnumTypes #4727

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

Conversation

sam0r040
Copy link
Contributor

@sam0r040 sam0r040 commented Aug 30, 2024

At Springwolf we use the parsed schemas to generate Examples. Thereby we use the field Schema.getName() for all schemas including enums.

When enumAsRef is used, the name of the enum is missing in its class schema. Also, when serialized, the name of a schema is ignored because of the @JsonIgnore annotation.

This PR adds the schema name for enums. We found the following comment:

// Store off the ref and add the enum as a top-level model

And therefore believe that all enum classes should appear as models, resulting in the adaption of the tests.

Relates to #4722

Co-authored-by: Timon Back <timonback@users.noreply.github.com>
@micryc micryc self-assigned this Sep 11, 2024
@micryc
Copy link
Contributor

micryc commented Sep 16, 2024

Hi @sam0r040 could you share some details on how you used enumAsRef annotation ? I think it should work as intended

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.

2 participants