NeuraLegion/har-sdk

OAS: Swagger editor may not pick up the correct media-type value

Closed this issue · 0 comments

The method OasV2ParameterObjectsParser.parseBodyParameter may not pick up the correct media-type value.

const mimeTypes = operationObject.consumes || ['application/json'];

The method should take into account least three cases:

  • root level consumes and no operation-level consumes
  • root level consumes overriding with non-empty operation-level consumes
  • root level consumes overriding with empty operation-level consumes; according to spec - "An empty value MAY be used to clear the global definition".