using Json.Schema.Generation;
public static void Main()
var schemaBuilder = new JsonSchemaBuilder();
var schema = schemaBuilder.FromType<TwoPeople>().Build();
Console.WriteLine(JsonSerializer.Serialize(schema, new JsonSerializerOptions {WriteIndented = true}));
[Description("A person")]
public record Person([property: Description("The name of the person")] NameInfo Name);
public record NameInfo(string First, string Last);
public required Person Person1 { get; init; }
public required Person Person2 { get; init; }