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

Change ModelResolver to better handle JsonIgnoreProperties #4418

Merged
merged 3 commits into from
Jun 1, 2023

Conversation

HaruhiSuzumiyah
Copy link
Contributor

@HaruhiSuzumiyah HaruhiSuzumiyah commented May 24, 2023

Rather than ignoring all properties with @JsonIgnoreProperties, we only ignore if it doesn't have the "allowGetters" = true

Since if it allowsGetters, you are going to receive it as part of the response

#3410

#4416

For example, the following line would cause var1 and var2 to be excluded:

@JsonIgnoreProperties(value = { "var1" , "var2" })

However if it has allowGetters, it isn't excluded
@JsonIgnoreProperties(value = { "var1" , "var2" }, allowGetters = true

Rather than ignoring all properties with @JsonIgnoreProperties, we only ignore if it doesn't have the "allowGetters" = true

Since if it allowsGetters, you are going to receive it as part of the response
@arakelian
Copy link

+1

}
propertiesToIgnore.addAll(resolveIgnoredProperties(annotations));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't be removed I believe

@frantuma frantuma merged commit 587b9f0 into swagger-api:master Jun 1, 2023
@frantuma
Copy link
Member

frantuma commented Jun 1, 2023

Thanks!

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.

3 participants