Skip to content

Fields with Getters that are not conforming to Java beans naming conventions are ignored #535

@schmidti159

Description

@schmidti159

Having a field like this, I would expect it to be present in the json schema, but it is not, when the Jackson module is enabled:

class MyDto {
    private String aField;

    public int getAField() {
        return aField;
    }
}

I saw that FieldScope already has some special handling to support these getters, but the field will be filtered here:

.noneMatch(propertyDefinition -> declaredName.equals(propertyDefinition.getInternalName())

I prepared a failing test and a workaround in this PR. Feel free to modify to your liking.

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