-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-openapi
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
When using the [Description]
attribute it would apply the description to the actual schema for each property referencing that schema.
in the example below
[Description("Class: DescribedReferencesDto")]
public class DescribedReferencesDto
{
[Description("Property: DescribedReferencesDto.Child1")]
public DescribedChildDto Child1 { get; set; }
[Description("Property: DescribedReferencesDto.Child2")]
public DescribedChildDto Child2 { get; set; }
public DescribedChildDto ChildNoDescription { get; set; }
}
[Description("Class: DescribedChildDto")]
public class DescribedChildDto
{
[Description("Property: DescribedChildDto.ChildValue")]
public string ChildValue { get; set; }
}
The description of DescribedChildDto
would become Property: DescribedReferencesDto.Child2
.
Also [Description]
attributes are only applied from properties.
Expected Behavior
[Description]
attributes should apply to the schema reference for referenced schemas.
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
.NET 10 preview 7
Anything else?
Metadata
Metadata
Assignees
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-openapi