When specifying content-type as described in the official document, a property not defined in the OpenAPI Specification called mediaType was added as a subproperty of schema. As a result, an invalid OAS was created.
To reproduce
Condition
Version: 0.1.104
Situation: When specifying content-type with the @mediaType tag above the request body type
In the openapiGenerator file, notice that the value of bodyParams is assigned with mediaType included. Modified bodyParams to not include the value by creating and assigning a separate variable called mediaType. I wanted to test this fix, but I couldn't find a test code. Please review if you find any issues.
Describe bug
When specifying
content-type
as described in the official document, a property not defined in the OpenAPI Specification calledmediaType
was added as a subproperty ofschema
. As a result, an invalid OAS was created.To reproduce
Condition
content-type
with the@mediaType
tag above the request body typeSchema and request body type
Generated OAS
Changes
In the
openapiGenerator
file, notice that the value ofbodyParams
is assigned withmediaType
included. ModifiedbodyParams
to not include the value by creating and assigning a separate variable calledmediaType
. I wanted to test this fix, but I couldn't find a test code. Please review if you find any issues.