I have tried several variations in my OpenAPI 2.0 spec but can't seem to crack this one. Here's my latest attempt:
"paths": {
"/": {
"post": {
"tags": [
"mcp-http-demoApi"
],
"description": "Adds two numbers.",
"operationId": "Add",
"consumes": [
"application/json"
],
"produces": [
"text/plain"
],
"parameters": [
{
"in": "header",
"name":"Accept",
"required": true,
"type": "string",
"default": "application/json; text/event-stream"
},
{
"in": "body",
"name": "body",
"required": true,
"schema": {
"type": "object"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "string"
}
}
}
}
}
},
In the swagger editor, this looks like:
curl -X 'POST' \
'https://{my}.{api}.azurecontainerapps.io/mcp/' \
-H 'accept: text/plain' \
-H 'Accept: application/json; text/event-stream' \
-H 'Content-Type: application/json' \
-d '{
"a":5,"b":9
}'
but I still get the 406. I tried putting both MIME types in the "consumes". It ignores anything after the first item.