<PackageReference Include="System.Text.Json" Version="10.0.0-rc.2.25502.107" />

JsonSchemaExporter

public static class JsonSchemaExporter
Maps .NET types to JSON schema objects using contract metadata from JsonTypeInfo instances.
public static JsonNode GetJsonSchemaAsNode(this JsonSerializerOptions options, Type type, JsonSchemaExporterOptions exporterOptions = null)

Generates a JSON schema corresponding to the contract metadata of the specified type.

public static JsonNode GetJsonSchemaAsNode(this JsonTypeInfo typeInfo, JsonSchemaExporterOptions exporterOptions = null)

Generates a JSON schema corresponding to the specified contract metadata.