We are migrating from spring-fox to springdoc.
Sometimes we need to hide properties from common base classes that are used in @ParameterObjects.
With spring-fox (swagger2) this was working fine:
public class BaseParameters {
private String baseProperty;
}
class CustomizedParameters extends BaseParameters {
@Override
@ApiParam(hidden = true)
public String getBaseProperty() {
return null;
}
}
The baseProperty doesn't show up in the api-docs
However with Springdoc this doesn't work:
@ParameterObject
public class BaseParameters {
private String baseProperty;
}
@ParameterObject
class CustomizedParameters extends BaseParameters {
@Override
@Hidden
public String getBaseProperty() {
return null;
}
}
I also tried to hide the baseProperty with @Parameter(hidden=true) and @JsonIgnore but the property stays in the specs
What am I missing? Is this not supported in springdoc? Any work-around?