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
When the OpenAPI doc is rendered through the v3 spec, the multipart/form-data request body is rendered correctly. However, when it's rendered through the v2 spec, the request body is missing.
To Reproduce
Steps to reproduce the behavior:
Build a function app containing a file upload field in a request body through the multipart/form-data content type.
Run the function app.
Access the OpenAPI document through http://localhost:7071/api/openapi/v3.json
Confirm whether it renders correctly.
Access the OpenAPI document through http://localhost:7071/api/openapi/v2.json
Confirm whether the request body is missing.
Expected behavior
The request body should be converted to the parameters, with the in value of file, in the v2 spec.
Screenshots
When it uses the OpenAPI v3 spec, the request body is rendered with no issue.
It's because the referencing NuGet package, OpenAPI.NET v1.2.3 doesn't pick up the request body schema reference. This PR over OpenAPI.NET partially fixed this issue – it only looked after the request body properties, not reference.
The text was updated successfully, but these errors were encountered:
Hi,
Can someone confirm if this issue is affecting content-type application/x-www-form-urlencoded also? I am seeing problems when I use contentType: application/x-www-form-urlencoded in the OpenApiRequestBody. When I open the swagger page there is nowhere to enter the body. Also when I import into Postman the selected Content-Type is "none"
Describe the issue
When the OpenAPI doc is rendered through the v3 spec, the
multipart/form-data
request body is rendered correctly. However, when it's rendered through the v2 spec, the request body is missing.To Reproduce
Steps to reproduce the behavior:
multipart/form-data
content type.http://localhost:7071/api/openapi/v3.json
http://localhost:7071/api/openapi/v2.json
Expected behavior
The request body should be converted to the parameters, with the
in
value offile
, in the v2 spec.Screenshots
When it uses the OpenAPI v3 spec, the request body is rendered with no issue.
However, when it uses the OpenAPI spec v2, the request body is missing – it should be converted to a parameter of
file
.Additional context
It's because the referencing NuGet package, OpenAPI.NET v1.2.3 doesn't pick up the request body schema reference. This PR over OpenAPI.NET partially fixed this issue – it only looked after the request body properties, not reference.
The text was updated successfully, but these errors were encountered: