Open
Description
Type of issue
Missing information
Description
For consideration
Newtonsoft.Json has the attribute
[JsonObject(Title = "title")]
Could you please provide documentation guidance (or note that it is not supported) on migrating from Newtonsoft.Json Attribute Property Title
which is used for metadata schema generation.
My understanding is there is no parallel in System.Text.Json and the common option is just to rename the Class to the appropriate name.
Perhaps this is out of scope for Migration, given this is schema related, and maybe belongs closer to the OpenApi docs? unsure.
I can see that for OpenApi something like this can be done,
public class RenameSchemaTransformer : IDocumentTransformer
{
public void Apply(OpenApiDocument document, OpenApiDocumentTransformerContext context)
{
if (document.Components.Schemas.TryGetValue("Address", out var schema))
{
document.Components.Schemas.Remove("Address");
schema.Title = "address";
document.Components.Schemas["address"] = schema;
}
}
}
Page URL
Content source URL
Document Version Independent Id
9c6a7135-eb75-21a9-1d27-0880459523ca
Platform Id
b4170058-145b-31e8-164f-9f71770c2ef2
Article author
Metadata
- ID: 6b74d77c-33e1-d44c-18c6-bd0b612f74de
- PlatformId: b4170058-145b-31e8-164f-9f71770c2ef2
- Service: dotnet-fundamentals