Skip to content

Return value of PropertyCustomizer is ignored #441

Closed
@robfletcher

Description

@robfletcher

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions