<PackageReference Include="NJsonSchema" Version="11.6.1" />

NJsonSchema.JsonSchema

A base class for describing a JSON schema.
namespace NJsonSchema { public class JsonSchema : JsonReferenceBase<JsonSchema>, IDocumentPathProvider, IJsonReference, IJsonReferenceBase, IJsonExtensionObject { public static string ToolchainVersion { get; } public bool IsBinary { get; } public JsonSchema InheritedSchema { get; } public JsonSchema InheritedTypeSchema { get; } public IReadOnlyCollection<JsonSchema> AllInheritedSchemas { get; } public OpenApiDiscriminator ResponsibleDiscriminatorObject { get; } public bool HasActualProperties { get; } public IReadOnlyDictionary<string, JsonSchemaProperty> ActualProperties { get; } public string SchemaVersion { get; set; } public string Id { get; set; } public string Title { get; set; } public bool HasTypeNameTitle { get; } public virtual string Description { get; set; } public JsonObjectType Type { get; set; } public JsonSchema ParentSchema { get; } public virtual object Parent { get; set; } public string Format { get; set; } public object Default { get; set; } public decimal? MultipleOf { get; set; } public decimal? Maximum { get; set; } public decimal? ExclusiveMaximum { get; set; } public bool IsExclusiveMaximum { get; set; } public decimal? Minimum { get; set; } public decimal? ExclusiveMinimum { get; set; } public bool IsExclusiveMinimum { get; set; } public int? MaxLength { get; set; } public int? MinLength { get; set; } public string Pattern { get; set; } public int MaxItems { get; set; } public int MinItems { get; set; } public bool UniqueItems { get; set; } public int MaxProperties { get; set; } public int MinProperties { get; set; } public bool IsDeprecated { get; set; } public string DeprecatedMessage { get; set; } public bool IsAbstract { get; set; } public bool? IsNullableRaw { get; set; } public object Example { get; set; } public bool IsFlagEnumerable { get; set; } public ICollection<object> Enumeration { get; } public bool IsEnumeration { get; } public ICollection<string> RequiredProperties { get; } public JsonSchema DictionaryKey { get; set; } public IDictionary<string, JsonSchemaProperty> Properties { get; } public JsonXmlObject Xml { get; set; } public IDictionary<string, JsonSchemaProperty> PatternProperties { get; } public JsonSchema Item { get; set; } public ICollection<JsonSchema> Items { get; } public JsonSchema Not { get; set; } public IDictionary<string, JsonSchema> Definitions { get; } public ICollection<JsonSchema> AllOf { get; } public ICollection<JsonSchema> AnyOf { get; } public ICollection<JsonSchema> OneOf { get; } public bool AllowAdditionalItems { get; set; } public JsonSchema AdditionalItemsSchema { get; set; } public bool AllowAdditionalProperties { get; set; } public JsonSchema AdditionalPropertiesSchema { get; set; } public bool IsObject { get; } public bool IsArray { get; } public bool IsTuple { get; } public bool IsDictionary { get; } public bool IsAnyType { get; } public virtual JsonSchema ActualSchema { get; } public virtual JsonSchema ActualTypeSchema { get; } public bool HasReference { get; } public bool HasAllOfSchemaReference { get; } public bool HasOneOfSchemaReference { get; } public bool HasAnyOfSchemaReference { get; } public IDictionary<string, object> ExtensionData { get; set; } public string ActualDiscriminator { get; } public string Discriminator { get; set; } public OpenApiDiscriminator ActualDiscriminatorObject { get; } public OpenApiDiscriminator DiscriminatorObject { get; set; } public Collection<string> EnumerationNames { get; set; } public Collection<string> EnumerationDescriptions { get; set; } public JsonSchema(); public static JsonSchema CreateAnySchema(); public static TSchemaType CreateAnySchema<[System.Runtime.CompilerServices.Nullable(0)] TSchemaType>() where TSchemaType : JsonSchema, new; public static Task<JsonSchema> FromFileAsync(string filePath, CancellationToken cancellationToken = default(CancellationToken)); public static Task<JsonSchema> FromFileAsync(string filePath, Func<JsonSchema, JsonReferenceResolver> referenceResolverFactory, CancellationToken cancellationToken = default(CancellationToken)); public static Task<JsonSchema> FromUrlAsync(string url, CancellationToken cancellationToken = default(CancellationToken)); public static Task<JsonSchema> FromUrlAsync(string url, Func<JsonSchema, JsonReferenceResolver> referenceResolverFactory, CancellationToken cancellationToken = default(CancellationToken)); public static Task<JsonSchema> FromJsonAsync(string data, CancellationToken cancellationToken = default(CancellationToken)); public static Task<JsonSchema> FromJsonAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken)); public static Task<JsonSchema> FromJsonAsync(string data, string documentPath, CancellationToken cancellationToken = default(CancellationToken)); public static Task<JsonSchema> FromJsonAsync(string data, string documentPath, Func<JsonSchema, JsonReferenceResolver> referenceResolverFactory, CancellationToken cancellationToken = default(CancellationToken)); public static Task<JsonSchema> FromJsonAsync(Stream stream, string documentPath, Func<JsonSchema, JsonReferenceResolver> referenceResolverFactory, CancellationToken cancellationToken = default(CancellationToken)); public static JsonSchema FromType<[System.Runtime.CompilerServices.Nullable(2)] TType>(); public static JsonSchema FromType(Type type); public static JsonSchema FromType<[System.Runtime.CompilerServices.Nullable(2)] TType>(JsonSchemaGeneratorSettings settings); public static JsonSchema FromType(Type type, JsonSchemaGeneratorSettings settings); public static JsonSchema FromSampleJson(string data); public bool Inherits(JsonSchema schema); public virtual bool IsNullable(SchemaType schemaType); public string ToJson(); public string ToJson(Formatting formatting); public JToken ToSampleJson(); public bool InheritsSchema(JsonSchema parentSchema); public ICollection<ValidationError> Validate(string jsonData, JsonSchemaValidatorSettings settings = null); public ICollection<ValidationError> Validate(JToken token, JsonSchemaValidatorSettings settings = null); public ICollection<ValidationError> Validate(string jsonData, SchemaType schemaType, JsonSchemaValidatorSettings settings = null); public ICollection<ValidationError> Validate(JToken token, SchemaType schemaType, JsonSchemaValidatorSettings settings = null); public static PropertyRenameAndIgnoreSerializerContractResolver CreateJsonSerializerContractResolver(SchemaType schemaType); } }