-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I'm working on a talk I'll be giving soon on new features in ASP.NET Core 7 and Minimal APIs, and in the process of updating my sample application for RC2 I've noticed a number of issues with the OpenAPI schema generated for various endpoints in the sample.
- Using implicit service resolution for an MVC controller renders the service as an object in the OpenAPI schema and as a query string parameter.
- Using TryParse() support for parameters for an MVC controller has a similar issue, and renders the query string parameter as an object mirroring the C# model, rather than as a string.
- Using the support for
StreamandPipeReaderto consume the request body shows bothStreamandPipeReaderin the schema.
Expected Behavior
MyServiceis not shown as an endpoint parameter and is not included in the OpenAPI schemas.- The
nameparameter is shown as a simple string andNameis not included in the OpenAPI schemas. StreamandPipeReaderare not included in the OpenAPI schemas.
Steps To Reproduce
- Clone the martincostello/aspnet-core-7-samples repository.
- Build and run the application.
- View the rendered OpenAPI schema with Swagger UI at
https://localhost:5001/swagger-ui/index.html.
Exceptions (if any)
None.
.NET Version
7.0.100-rc.2.22477.23
Anything else?
> dotnet --info
.NET SDK:
Version: 7.0.100-rc.2.22477.23
Commit: 0a5360315a
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.100-rc.2.22477.23\
Host:
Version: 7.0.0-rc.2.22472.3
Architecture: x64
Commit: 550605cc93Metadata
Metadata
Assignees
Labels
area-minimalIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etcIncludes minimal APIs, endpoint filters, parameter binding, request delegate generator etc





