Open
Description
cc: @captainsafia
Nullable query parameters are not generated as nullable in OpenAPI Document, such as:
group.MapGet("long", (long? myLong) => { })
.WithName("NullableLong");
becomes:
"get": {
"tags": [
"Nullable"
],
"operationId": "NullableLong",
"parameters": [
{
"name": "myLong",
"in": "query",
"schema": {
"type": "integer",
"format": "int64"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
I believe the cause is line 745:
aspnetcore/src/OpenApi/src/Services/OpenApiDocumentService.cs
Lines 739 to 761 in 684e739
Is there a historical reason for always unwrapping nullable parameter types?