Skip to content

Conversation

@Mattias-Sehlstedt
Copy link
Contributor

Fixes #3128

Note that I cannot claim to understand the different ways of deriving a request body, due to there being so many different ways of branching the calculation. When debugging the issue I found that the calculation never let go of the default type from the method, and thus json always remained as one of the types, as reported in the issue.

I reintroduced a previous check for if (!methodAttributes.isWithResponseBodySchemaDoc()), that would prevent another calculation round if there is an explicit swagger-core annotation defined (i.e., someone wants to explicitly set the content type that will be present in the specification).

It could be that there are better and more logical ways of realizing this given the changes that were conducted in dcdb1b7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected "application/json" content generated for request body of a POST operation

1 participant