Open s2quake opened 1 month ago
Hi I would like to use NJsonSchema to generate the following schema. However, no matter what I tried, I was unable to generate the following schema.
NJsonSchema
{ "$schema": "http://json-schema.org/draft-07/schema#", "allOf": [ { "$ref": "https://json.schemastore.org/appsettings.json" } ] }
The code below is the code I tried to create the schema like above. How can I create a schema like the one above?
public string ToJson() { var appsettingsUrl = "https://json.schemastore.org/appsettings.json"; var appsettingsSchema = new JsonSchema { DocumentPath = appsettingsUrl, Id = appsettingsUrl, }; var appSchema = new JsonSchema { SchemaVersion = "http://json-schema.org/draft-07/schema#", AllOf = { new JsonSchema { Reference = appsettingsSchema, }, }, }; return appSchema.ToJson(); }
Hi I would like to use
NJsonSchema
to generate the following schema. However, no matter what I tried, I was unable to generate the following schema.The code below is the code I tried to create the schema like above. How can I create a schema like the one above?