Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Text.​Json.​Schema.​JsonSchemaExporter
Assembly: System.Text.Json
Inheritance: object → JsonSchemaExporter
Maps .NET types to JSON schema objects using contract metadata from <see cref="T:System.Text.Json.Serialization.Metadata.JsonTypeInfo" /> instances.
Methods
public static
Nodes.​JsonNode
GetJsonSchemaAsNode​(JsonSerializerOptions options,
Type type,
JsonSchemaExporterOptions? exporterOptions = null)
Generates a JSON schema corresponding to the contract metadata of the specified type.
Returns A new <see cref="T:System.Text.Json.Nodes.JsonNode" /> instance defining the JSON schema for <paramref name="type" /> .
options
The options instance from which to resolve the contract metadata.
type
The root type for which to generate the JSON schema.
exporterOptions
The exporterOptions object controlling the schema generation.
public static
Nodes.​JsonNode
GetJsonSchemaAsNode​(Serialization.​Metadata.​JsonTypeInfo typeInfo,
JsonSchemaExporterOptions? exporterOptions = null)
Generates a JSON schema corresponding to the specified contract metadata.
Returns A new <see cref="T:System.Text.Json.Nodes.JsonNode" /> instance defining the JSON schema for <paramref name="typeInfo" /> .
typeInfo
The contract metadata for which to generate the schema.
exporterOptions
The exporterOptions object controlling the schema generation.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object