A property named "aFoo" use the method name instead of property name in specification.
I have a property named "aFoo" and the generated specification is not correct.
private boolean aFoo;
public boolean isaFoo() { return aFoo; }
public void setaFoo(boolean aFoo) { this.aFoo = aFoo; }
{
"allOf": [
{
"type": "object",
"properties": {
"isaFoo": {
"type": "boolean"
}
}
}
],
"type": "object"
}
The class ModelResolver choose the name of the method instead of the name of the property. The method name is choosed because the first letter after the prefix is not an uppercase but according to the java beans specification the naming is correct and the name of the property should be used.
http://download.oracle.com/otn-pub/jcp/7224-javabeans-1.01-fr-spec-oth-JSpec/beans.101.pdf 8.8 Capitalization of inferred names.
Expected :
{
"allOf": [
{
"type": "object",
"properties": {
"aFoo": {
"type": "boolean"
}
}
}
],
"type": "object"
}
Indeed this is the same problem as in #4164, the issues can be linked. The solution (or workaround) is to use @Schema(name="aFoo"), also @JsonProperty("aFoo") should work