swagger-api / swagger-core

Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
http://swagger.io
Apache License 2.0
7.36k stars 2.17k forks source link

[BUG] Using builder setter and setting JsonProperty Access will not get property types correctly #4690

Open fangzhengjin opened 3 weeks ago

fangzhengjin commented 3 weeks ago

Using builder setter and setting JsonProperty Access will not get property types correctly.

public class ResourceSearchVO implements Serializable {
    private String name;
    @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
    private ResourceEnum type;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public ResourceEnum getType() {
        return type;
    }

    public ResourceSearchVO setType(ResourceEnum type) {
        this.type = type;
        return this;
    }
}
image image