-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
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
Remove generation of schemas in OpenAPI package #42169
Conversation
Co-authored-by: Damian Edwards <damian@damianedwards.com>
@brunolins16 Mind giving this a review? |
{ | ||
Schema = OpenApiSchemaGenerator.GetOpenApiSchema(type) | ||
}; | ||
responseContent[contentType] = new OpenApiMediaType(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Swashbuckle will now read this information and populate the Schema
, is that how it will work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Part of #41246.
Since generating accurate OpenAPI schemas for all DTOs in ✨ big work ✨, we're temporarily removing this from the OpenAPI package and instead opting with a "merge" strategy where we will leverage existing OpenAPI schema support in Swashbuckle.
Long-term, we want to explore more foundational support for generating JSON schemas (which OpenAPI schemas are a derivative of) in either System.Text.Json (ref) or Microsoft.OpenAPI (ref).