swagger-core
swagger-core copied to clipboard
Java: Add support for fluent APIs
In my company when we create code in Java we always use a fluent api, mostly using Project Lombok.
@lombok.Data
@lombok.experimental.Accessors(fluent=true)
public class Person{
private String name;
}
lombok creates the accessors
public String name()
public void name(String name)
for us.
In our current setup:
spring-boot 2.3.1 with webmvc and tomcat
springdoc-openapi-ui 1.4.2
swaggerApiVersion = '2.1.3'
the OpenAPI 3 Description does not contain name at all, I suppose it is looked for the getName() method which does not exist.
Please add the support of recognize getter / setter methods without the prefixes get/set as it is already implemented in the micronaut-openapi project.
If the addition of this feature is too much effort, please give me a hint which class in springdoc-openapi needs to be extended.
Wow mid 2020 and no response....think it's safe to say this will not be supported.... tragic.
When using Swagger-Core-2.1.12 with jackson, adding @JsonProperty
annotation on the fluent attribute seems to fix this