Background
When using the HttpBody mechanism for gRPC to REST mapping in the API, the server can send responses with any content type and will set the Content-Type header accordingly at runtime. However, the OpenAPI specification generated by protoc-gen-openapiv2 cannot correctly represent this dynamic behavior, always showing application/json in the documentation.
Example
In PR #19, a new endpoint was added: /api/fulfillment/v1/clusters/{cluster_id}/kubeconfig
This endpoint returns YAML content with content type application/yaml, but the generated OpenAPI documentation shows it as returning application/json.
Proposed Solution
We need to implement a post-processing step for the generated OpenAPI documentation to correct these inconsistencies, ensuring that the documentation accurately reflects the API's actual behavior.
This issue was identified in the following discussion: #19 (comment)