Skip to content

PropertyCustomizer not invoked for multiple properties of same type with the same annotations. #1000

@banderous

Description

@banderous

A PropertyCustomizer is not invoked for every property where those properties have the same type and annotations.

For example with the following class (HelloController test here):

  public static class ApiType {
      Long a;
      Long b;
      String c;
     // getters...
  }

A PropertyCustomizer is invoked for properties 'a' & 'c' only; it is not invoked for property b (which shares the result of 'a').

This appears to be because the swagger generator is caching properties that share the same type and annotations and this is bypassing the type resolution process that drives the PropertyCustomizer.

Springdoc 1.5.2
Spring boot 2.4.1

Expected behavior
PropertyCustomizer is invoked for every property.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions