No valid values defined for var=VarDef[200.Content.Media-Type] #212
-
I just got started with OpenAPI and Tcases. Please be patient. I have a question about the following error message from Tcases.
It seems to me, that Tcases requires a media-type for a post response 200. Afaik this is not required by the OpenAPI 3.0 spec. Is this check configurable in Tcases? I had a look at Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You did not attach an OpenAPI definition to reproduce this problem. However, I was able to reproduce this symptom using a response definition with an empty {
"openapi": "3.0.0",
"info": {
"title": "Responses",
"version": "0.0.0"
},
"paths": {
"/responses": {
"get": {
"responses": {
"200": {
"description": "No content",
"content": {
}
}
}
}
}
}
} On the one hand, dropping the |
Beta Was this translation helpful? Give feedback.
You did not attach an OpenAPI definition to reproduce this problem. However, I was able to reproduce this symptom using a response definition with an empty
content
map -- see below. But that's a peculiar way to say "no content". A simpler way is to just omit thecontent
field entirely, in which case the problem goes away. Assuming this matches your situation, that would be an easy fix. Do you agree?