Skip to content

DateOnly and TimeOnly are displayed as complex objects in open-api schemas rather simple string #37045

@rafikiassumani-msft

Description

@rafikiassumani-msft

Describe the bug

DateOnly and TimeOnly are being displayed as complex objects in open api schemas for Minimal API endpoints rather than being treated as simple strings. It will make sense for open api to treat them as string -$date-only and string -$time-only

app.MapGet("/events", (DateOnly dateOnly, TimeOnly timeonly) => $" date and time values ... ")

Exceptions (if any)

  ### Further technical details
  .NET SDK (reflecting any global.json):
   Version:   6.0.100-rc.2.21465.13
   Commit:    0d1cdfa6a0
  
  Runtime Environment:
   OS Name:     Windows
   OS Version:  10.0.19043
   OS Platform: Windows
   RID:         win10-x64
   Base Path:   C:\Program Files\dotnet\sdk\6.0.100-rc.2.21465.13\

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:2Work that is important, but not critical for the releasefeature-openapiold-area-web-frameworks-do-not-use*DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions