Skip to content

Return value of PropertyCustomizer is ignored #441

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

Closed
robfletcher opened this issue Feb 18, 2020 · 1 comment
Closed

Return value of PropertyCustomizer is ignored #441

robfletcher opened this issue Feb 18, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@robfletcher
Copy link

The method signature of PropertyCustomizer.customize declares that it returns Schema but the return value is ignored. If you look at https://github.com/springdoc/springdoc-openapi/blob/master/springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PropertyCustomizingConverter.java#L44 you can see that PropertyCustomizer instances are invoked in a forEach so while they can mutate their property parameter, their return value is never used. That means PropertyCustomizer instances cannot (easily) replace the default schema. Also since the property parameter can sometimes be null there are situations in which they cannot be effective at all.

@bnasslahsen
Copy link
Collaborator

Hi @robfletcher,

Thank you for your feedback.
A fix for this issue will be available on the next release v1.2.32.

@bnasslahsen bnasslahsen added the bug Something isn't working label Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants