We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When defining an endpoint that has two possible return types with the same status code (both 200 OK), one WITH content and one WITHOUT content:
app.MapGet("/auth/test", Test).WithOpenApi(); internal static Results<Ok, Ok<TestClass>> Test() { return TypedResults.Ok(); }
The resulting swagger.json does not reflect this:
"/auth/test": { "get": { "tags": [ "AuthEndpoints" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestClass" } } } } } } },
I would expect a resulting swagger.json like:
"/auth/test": { "get": { "tags": [ "AuthEndpoints" ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TestClass" } } } }, "200": { "description": "OK" } } } },
But I imagine defining "200" twice is problematic for the spec.
The text was updated successfully, but these errors were encountered:
For anyone wondering why this usecase, I ran into it in the MapIdentityApi Endpoints: https://github.com/dotnet/aspnetcore/blob/e2e689acc6e17371d1546556825c533f35446e1d/src/Identity/Core/src/IdentityApiEndpointRouteBuilderExtensions.cs#L90
Sorry, something went wrong.
No branches or pull requests
When defining an endpoint that has two possible return types with the same status code (both 200 OK), one WITH content and one WITHOUT content:
The resulting swagger.json does not reflect this:
I would expect a resulting swagger.json like:
But I imagine defining "200" twice is problematic for the spec.
The text was updated successfully, but these errors were encountered: