Closed mikekistler closed 1 month ago
Via offline discussion, we concluded that the default encoding
values that OpenAPI assumes correctly match the behavior of the implementation so we can remove these settings from being explicitly set in the document.
Is there an existing issue for this?
Describe the bug
The operation in the generated OpenAPI for an endpoint that accepts a "binary" FromForm parameter (e.g.
byte[]
) has a requestBody that includes anencoding
field with incorrect contents. The encoding field is generated as:But the OpenAPI specifcation says that
encoding
is:The
encoding
object shown above is incorrect because "multipart/form-data" is not a property name in the associated schema.Expected Behavior
I'm not really sure what information this
encoding
is intended to convey. It might be possible to simply delete it. But if it is important for some reason then the key must be a property name in the schema.Steps To Reproduce
This branch https://github.com/mikekistler/aspnet-openapi-examples/tree/bug-57082 contains a recreate for this problem in the FormBodiesApi.cs file.
Exceptions (if any)
No response
.NET Version
9.0.100-rc.1.24380.1
Anything else?
No response