mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add $schema property to schema generation
This commit is contained in:
parent
665b41ac52
commit
e5b8aeeda7
@ -62,6 +62,12 @@ public static class SchemaExporter
|
||||
{
|
||||
var schema = JsonSchema.FromType<T>(_generatorSettings);
|
||||
schema.Title = _title;
|
||||
var schemaLinkProp = new JsonSchemaProperty
|
||||
{
|
||||
Type = JsonObjectType.String,
|
||||
Description = "The schema to validate with"
|
||||
};
|
||||
schema.Properties.Add("$schema", schemaLinkProp);
|
||||
schema.ExtensionData ??= new Dictionary<string, object>();
|
||||
schema.ExtensionData.Add("$docs", new Dictionary<string, object>
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user