Surfaced during a cross-repo audit of the examples-parsing implementation. These are pre-existing gaps (they pre-date the examples work and also drop the schema, not just examples), so they were intentionally left out of the examples PRs and tracked here. All three cause silent data loss on spec-legal input. File: plugins/communication_protocols/http/src/utcp_http/openapi_converter.py.
1. OAS3 requestBody with a non-application/json media type drops the entire body
_extract_inputs hard-codes content.get("application/json", ...) with no fallback, unlike _extract_outputs which falls back to the first media type with a schema. A body declared only as application/xml, application/*+json, text/plain, etc. produces a tool with no body input at all.
2. OAS3 parameter content form is ignored
A Parameter Object may carry its schema under content: {<media-type>: {schema, example, examples}} instead of schema. _extract_inputs only reads param.get("schema"), so the schema and examples are lost.
3. OAS2 response examples sibling map is not read
In Swagger 2.0 the response example lives at responses.<code>.examples as { <mime>: <value> } (raw values, not Example Objects). _extract_outputs only reads responses.<code>.schema, so OAS2 response examples are dropped. Note this shape differs from the three forms _extract_examples handles and needs bespoke extraction.
Notes
- Same gaps exist in typescript-utcp (companion issue to be linked).
- Suggested fix order: (1) and (3) are the higher-impact; (2) needs parameter-
content schema support generally.
Surfaced during a cross-repo audit of the examples-parsing implementation. These are pre-existing gaps (they pre-date the examples work and also drop the schema, not just examples), so they were intentionally left out of the examples PRs and tracked here. All three cause silent data loss on spec-legal input. File:
plugins/communication_protocols/http/src/utcp_http/openapi_converter.py.1. OAS3
requestBodywith a non-application/jsonmedia type drops the entire body_extract_inputshard-codescontent.get("application/json", ...)with no fallback, unlike_extract_outputswhich falls back to the first media type with a schema. A body declared only asapplication/xml,application/*+json,text/plain, etc. produces a tool with nobodyinput at all.2. OAS3 parameter
contentform is ignoredA Parameter Object may carry its schema under
content: {<media-type>: {schema, example, examples}}instead ofschema._extract_inputsonly readsparam.get("schema"), so the schema and examples are lost.{ "name": "filter", "in": "query", "content": { "application/json": { "schema": {...}, "example": {...} } } }3. OAS2 response
examplessibling map is not readIn Swagger 2.0 the response example lives at
responses.<code>.examplesas{ <mime>: <value> }(raw values, not Example Objects)._extract_outputsonly readsresponses.<code>.schema, so OAS2 response examples are dropped. Note this shape differs from the three forms_extract_exampleshandles and needs bespoke extraction.Notes
contentschema support generally.