We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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(); }
The text was updated successfully, but these errors were encountered:
The problem is, that the SchemaVersion is hard coded, see
SchemaVersion
NJsonSchema/src/NJsonSchema/JsonSchema.cs
Lines 898 to 904 in 9bf8f69
...so it cannot be changed...
Any plan to support a newer version like the latest ones from 2022, see here
Sorry, something went wrong.
No branches or pull requests
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?
The text was updated successfully, but these errors were encountered: