JsonSchemaExporter.GetJsonSchemaAsNode Metod

Definition

Överlagringar

Name Description
GetJsonSchemaAsNode(JsonTypeInfo, JsonSchemaExporterOptions)

Genererar ett JSON-schema som motsvarar angivna kontraktmetadata.

GetJsonSchemaAsNode(JsonSerializerOptions, Type, JsonSchemaExporterOptions)

Genererar ett JSON-schema som motsvarar kontraktmetadata för den angivna typen.

GetJsonSchemaAsNode(JsonTypeInfo, JsonSchemaExporterOptions)

Källa:
JsonSchemaExporter.cs
Källa:
JsonSchemaExporter.cs
Källa:
JsonSchemaExporter.cs
Källa:
JsonSchemaExporter.cs

Genererar ett JSON-schema som motsvarar angivna kontraktmetadata.

public static System.Text.Json.Nodes.JsonNode GetJsonSchemaAsNode(this System.Text.Json.Serialization.Metadata.JsonTypeInfo typeInfo, System.Text.Json.Schema.JsonSchemaExporterOptions? exporterOptions = default);
static member GetJsonSchemaAsNode : System.Text.Json.Serialization.Metadata.JsonTypeInfo * System.Text.Json.Schema.JsonSchemaExporterOptions -> System.Text.Json.Nodes.JsonNode
<Extension()>
Public Function GetJsonSchemaAsNode (typeInfo As JsonTypeInfo, Optional exporterOptions As JsonSchemaExporterOptions = Nothing) As JsonNode

Parametrar

typeInfo
JsonTypeInfo

Kontraktmetadata som schemat ska genereras för.

exporterOptions
JsonSchemaExporterOptions

ExporterOptions-objektet som styr schemagenereringen.

Returer

En ny JsonNode instans som definierar JSON-schemat för typeInfo.

Undantag

En av de angivna parametrarna är null.

Parametern typeInfo innehåller exporterOptions som inte stöds.

Gäller för

GetJsonSchemaAsNode(JsonSerializerOptions, Type, JsonSchemaExporterOptions)

Källa:
JsonSchemaExporter.cs
Källa:
JsonSchemaExporter.cs
Källa:
JsonSchemaExporter.cs
Källa:
JsonSchemaExporter.cs

Genererar ett JSON-schema som motsvarar kontraktmetadata för den angivna typen.

public static System.Text.Json.Nodes.JsonNode GetJsonSchemaAsNode(this System.Text.Json.JsonSerializerOptions options, Type type, System.Text.Json.Schema.JsonSchemaExporterOptions? exporterOptions = default);
static member GetJsonSchemaAsNode : System.Text.Json.JsonSerializerOptions * Type * System.Text.Json.Schema.JsonSchemaExporterOptions -> System.Text.Json.Nodes.JsonNode
<Extension()>
Public Function GetJsonSchemaAsNode (options As JsonSerializerOptions, type As Type, Optional exporterOptions As JsonSchemaExporterOptions = Nothing) As JsonNode

Parametrar

options
JsonSerializerOptions

Alternativinstansen som kontraktmetadata ska matchas från.

type
Type

Den rottyp som JSON-schemat ska genereras för.

exporterOptions
JsonSchemaExporterOptions

ExporterOptions-objektet som styr schemagenereringen.

Returer

En ny JsonNode instans som definierar JSON-schemat för type.

Undantag

En av de angivna parametrarna är null.

Parametern options innehåller exporterOptions som inte stöds.

Gäller för