OpenAPI doesn't support stream parameters #59770
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-openapi
Is there an existing issue for this?
Describe the bug
Microsoft.AspNetCore.OpenApi.OpenApiSchemaStore
prepopulate theStream
schema (note that it doesn't use the latest openapi representation but that would be an enhancement) but the key uses parameterinfo (set to null by default) so the getoradd in the store fails cause when using[FromBody] Stream body
there is a parameter info.Note that setting
Stream
as metadata to avoid to have a parameter fails inMicrosoft.AspNetCore.OpenApi.OpenApiSchemaService.GetOrCreateSchemaAsync
cause there is an api description so it still tries to lookup aJsonTypeInfo
.TIP: using this code can workaround the issue in an ugly manner:
Expected Behavior
The
Stream
schema is looked up as expectedSteps To Reproduce
use an minimal api endpoint with request body in parameters
Exceptions (if any)
No response
.NET Version
9
Anything else?
No response
The text was updated successfully, but these errors were encountered: