-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot transform Response Objects for OpenAPIToGraphQL (Content-Type: application/vnd.kafka.v2+json) #3044
Comments
If you inspect the following three locations, you will find content-type conditional logic being used to evaluate the schema or the submitted request body. packages/handlers/openapi/src/openapi-to-graphql/oas_3_tools.ts:458-463 If you provide handlers for the expanded use cases e.g. application/[????]+json, noted in the description for this issue above, you could alter the generic 'application/json', and make it slightly more inclusive. This will resolve the issue and enable slightly greater utility for those custom media types that may be used in the future. These are ALL just variants that still conform to the JSON standard, and should still be parseable as JSON, therefore no additional handling should be necessary, as the JSON parser is already being used. Although currently it uses the reduced options for media-types marked with the 'content' key as defined in the schema. We have already built and tested these changes locally, and may submit a PR soon. You can modify the build product with patches to achieve this locally, until a PR lands, in your own dev environment. |
The above changes may inform a path to resolve for this feature. |
* feat: expand content type handling in openapi handler. possibly resolves for issue #3044 * Add a changeset * Go Co-authored-by: JB Smith <[email protected]>
Hello,
We have added an OpenAPI endpoint exposed by Strimzi Kafka Bridge for consumption of Kafka related activities.
Below is the OpenAPI mapping in the .meshrc.yaml
Encountering 'String cannot represent value: ' for all endpoint object responses except methods that return string.
Kindly helps us on how to deal with Content-Type: application/vnd.kafka.v2+json
Please find attached the screenshot for the error details.
But the endpoint is working with Postman
The text was updated successfully, but these errors were encountered: