I have this @ApiImplicitParam annotation used by SpringFox to document endpoint. I want to migrate to springdoc.
@ApiImplicitParam(name = "Proxy", value = "Authorization value", required = true, dataType = "string", paramType = "header")
public .. endpoint(...){
.....
}
I replaced it to this:
@Parameter(name = "Proxy", description = "Authorization value", required = true, dataType = "string", paramType = "header")
public .. endpoint(...){
.....
}
But I get Cannot resolve method 'dataType' and Cannot resolve method 'paramType'. Do you know what should be the proper replacement for these values in springdoc?
As you found,
dataTypeisn't supported. Instead we havecontent,schema, andarray(for array elements) fields. It can be used in either of the below waysUsing just
schemaUsing
schemain conjunction withcontentI've not tried the first one personally and in fact is the first time I saw it. (Maybe it was introduced in Springdoc 2.x?) But it seems to be cleaner way compared to the second.