JsonSchemaGenerator Class
Namespace: Stimulsoft.Base.Json.Schema
Properties
| Property | Type | Description |
|---|---|---|
| Schema | JsonSchema | |
| Type | Type | |
| UndefinedSchemaIdHandling | UndefinedSchemaIdHandling | Gets or sets how undefined schemas are handled by the serializer. |
Methods
| Method | Returns | Description |
|---|---|---|
| Generate (+3 overloads) | JsonSchema | Generate a JsonSchema from the specified type. |
Method Details
Generate
Generate(type: Type): JsonSchema
Generate a JsonSchema from the specified type.
Parameters
- type (Type) — The type to generate a JsonSchema from.
Returns JsonSchema — A JsonSchema generated from the specified type.
Generate(type: Type, resolver: JsonSchemaResolver): JsonSchema
Generate a JsonSchema from the specified type.
Parameters
- type (Type) — The type to generate a JsonSchema from.
- resolver (JsonSchemaResolver) — The JsonSchemaResolver used to resolve schema references.
Returns JsonSchema — A JsonSchema generated from the specified type.
Generate(type: Type, rootSchemaNullable: bool): JsonSchema
Generate a JsonSchema from the specified type.
Parameters
- type (Type) — The type to generate a JsonSchema from.
- rootSchemaNullable (bool) — Specify whether the generated root JsonSchema will be nullable.
Returns JsonSchema — A JsonSchema generated from the specified type.
Generate(type: Type, resolver: JsonSchemaResolver, rootSchemaNullable: bool): JsonSchema
Generate a JsonSchema from the specified type.
Parameters
- type (Type) — The type to generate a JsonSchema from.
- resolver (JsonSchemaResolver) — The JsonSchemaResolver used to resolve schema references.
- rootSchemaNullable (bool) — Specify whether the generated root JsonSchema will be nullable.
Returns JsonSchema — A JsonSchema generated from the specified type.