API / Improve OpenAPI spec schema / Formatter#9106
Conversation
When using generated client from formatter API, the doc is missing the accept headers and the all request parameters which may be used in some formatters (eg. citation). For accept headers, it looks like when ALL_VALUE is in produces, Swagger UI shows no response content type. Explicitly declare them.
|
| ) | ||
| ) | ||
| @RequestParam(required = false) | ||
| Map<String, String> allRequestParameters, |
There was a problem hiding this comment.
Is there a reason
FormatMetadata(context, key, request)
Would not be changed to
FormatMetadata(context, key, allRequestParameters)
I find it to be confusing to add a parameter in this fashion and then supply the request object to extract the parameter. From java perspective, it seems like allRequestParameters is not used.
As a minimum maybe some comment should be added to indicate that allRequestParameters is used in the FormatMetadata object based on the request object. This would make it more clear where the field is used.
However, I think it would still be cleaner if FormatMetadata were updated to support the parameters instead of supplying the request object and then have it parse the allRequestParameters when there is no need to parse the object as it is already available.



When using generated client from formatter API, the doc is missing the accept headers and the all request parameters which may be used in some formatters (eg. citation).
For accept headers, it looks like when ALL_VALUE is in produces, Swagger UI shows no response content type. Explicitly declare them.
Follow up of #8602
Checklist
mainbranch, backports managed with labelREADME.mdfilespom.xmldependency management. Update build documentation with intended library use and library tutorials or documentation