Class JsonSchema
- Namespace
- ShapeShift.Json
- Assembly
- ShapeShift.Json.dll
Projects format-neutral DataContract graphs onto JSON Schema documents.
public static class JsonSchema
- Inheritance
-
JsonSchema
- Inherited Members
Remarks
The generated documents conform to the 2020-12 dialect.
Representations that JSON Schema cannot express are annotated with
x-shapeshift-* and (for MessagePack) x-msgpack-* keywords.
Unknown extension keywords are ignored by conforming validators, so the documents remain valid
and usable by ordinary JSON Schema tooling.
Fields
Dialect
The URI of the JSON Schema dialect that this class emits.
public const string Dialect = "https://json-schema.org/draft/2020-12/schema"
Field Value
Methods
Create(DataContract, JsonSchemaOptions?)
Creates a JSON Schema document that describes a contract.
public static JsonObject Create(DataContract contract, JsonSchemaOptions? options = null)
Parameters
contractDataContractThe contract to describe.
optionsJsonSchemaOptionsOptions that influence the projection. May be null for defaults.
Returns
- JsonObject
A mutable JSON Schema document.