You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A response with, for example, a Content-Type: application/json; version=2 header fails validation against a spec that defines that same type as a valid response type, like so:
Message: GET / 200 operation response content type 'application/json' does not exist
HowToFix: The content type is invalid, Use one of the 1 supported types for this operation: application/json; version=2
This seems to be happening because helpers.ExtractContentType() assumes Charset and Boundary as the only valid header values for Content-Type and discards everything else.
Further down the validation logic, on L72 of responseBodyValidator.ValidateResponseBodyWithPathItem(), this content type stripped to a media type is then being compared directly with the content types allowed by the specification. This will of course always fail if any additional header values are present in the spec.
The text was updated successfully, but these errors were encountered:
A response with, for example, a
Content-Type: application/json; version=2
header fails validation against a spec that defines that same type as a valid response type, like so:The returned validation error:
This seems to be happening because helpers.ExtractContentType() assumes
Charset
andBoundary
as the only valid header values forContent-Type
and discards everything else.Further down the validation logic, on L72 of responseBodyValidator.ValidateResponseBodyWithPathItem(), this content type stripped to a media type is then being compared directly with the content types allowed by the specification. This will of course always fail if any additional header values are present in the spec.
The text was updated successfully, but these errors were encountered: