Skip to content

OpenAPI v2 is not read properly when Produces/Consumes is not provided #842

@darrelmiller

Description

@darrelmiller

Related: #706

The OpenAPI v2 specification is not clear that Produces/Consumes are required to be able to completely describe an API request/response.

This means that when OpenAPI v2 documents are read in, if they don't have a produces/consumes then there is no media type object created and there is nowhere to put any schema that has been specified.

By adding a defaultContentType property to the OpenApiReaderSettings object we can use that to create a content object if there is no produces/consumes and we will not lose the schema information. This will not change the default behavior of library.

Metadata

Metadata

Assignees

Labels

priority:p1High priority but not blocking. Causes major but not critical loss of functionality SLA <=7daystype:enhancementEnhancement request targeting an existing experience

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions