Description
Currently we can only set description
as an annotation on an OpenApiSchemaReference. With OpenApi 3.1 and Json Schema 2020-12 it's allowed to apply all annotations on a reference.
Annotations: https://json-schema.org/understanding-json-schema/reference/annotations#annotations
Spec: https://json-schema.org/draft/2020-12/json-schema-core#section-7.7.1.1
Meta data schema: json-schema.org/draft/2020-12/meta/meta-data
Why
When mapping nested classes to OpenApi in ASP.NET Core it uses comments to apply annotations like title, description, examples. But this is currently limited to only apply a description for a reference. In the [example](https://json-schema.org/understanding-json-schema/reference/annotations#annotations
Spec: https://json-schema.org/draft/2020-12/json-schema-core#section-7.7.1.1) provided in the spec it would be awesome to be able to set different metadata on properties (which become references).
Links
Related issue: dotnet/aspnetcore#61965