Skip to content

Conversation

@fxprunayre
Copy link
Member

@fxprunayre fxprunayre commented Nov 24, 2025

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.

image

Follow up of #8602

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

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.
@fxprunayre fxprunayre added this to the 4.4.10 milestone Nov 24, 2025
@fxprunayre fxprunayre requested a review from josegar74 November 24, 2025 16:18
@fxprunayre fxprunayre changed the title API / Improve OpenAPI spec schema. API / Improve OpenAPI spec schema / Formatter Nov 24, 2025
@sonarqubecloud
Copy link

)
)
@RequestParam(required = false)
Map<String, String> allRequestParameters,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants