NJsonSchema
NJsonSchema copied to clipboard
JSON Schema reader, generator and validator for .NET
It seems failed to load schema for FHIR from http://hl7.org/fhir/json-schema, for example http://hl7.org/fhir/json-schema/EnrollmentRequest, it took long long time to return from JsonSchema4.FromUrlAsync (actually I have to kill it). var schema...
My swagger looks like this ```json "OptionChainPair": { "type": "object", "properties": { "optioncall": { "xml": { "name": "Call" }, "description": "The option call in the option chain pair", "$ref": "#/definitions/OptionDetails"...
Hey I have a schema which I use to generate C# classes out of it. One issue that I observed was that a schema with an array property of a...
The best way to ensure that LLMs return structured data properly is using GBNF format. It would be great if NJsonSchema generated GBNF formats. Here's some documentation on it and...
Referenced in this issue: https://github.com/RicoSuter/NSwag/issues/2991 The only valid solution to generation of classes in C# to support anyOf and oneOf, is to merge all the properties together into the request...
Hello! The error occurs if a external file contains a ref to an object from the same external file. Error text - System.InvalidOperationException: Could not resolve the path '#/myInt' Examples:...
Good day, If I want to validate a JSON using a schema, I get an incorrect result. Case 1: I used the directed SPDX schema. (https://github.com/spdx/spdx-spec/blob/development/v2.3.1/schemas/spdx-schema.json) I then took an...
I have discovered an interesting problem in NJsonSchema validation. For some context, I am using NJsonSchema to validate data coming in from a [json-forms](https://jsonforms.io/) implementation. I won't include my exact...
STJ has problems with `JsonStringEnumConverter` when values come from `EnumMemberAttribute`. This can be bypassed by configuring serializer setting, but property setting win over them so there needs to be a...
Here's my code ``` var generatorSettings = new JsonSchemaGeneratorSettings { SerializerSettings = null, SerializerOptions = JsonSerializerSettings.AIInputOptions, UseXmlDocumentation = false }; var schema = JsonSchema.FromType(generatorSettings) ?? throw new InvalidOperationException(); return schema.ToJson();...