I am working on Generating JSON Schema from .NET type using NJsonSchema. I am getting references("$ref"...) for complex type in the generated json.
"properties": {
"resourceType": {
"type": "string"
},
"id": {
"type": "string"
},
"onset": {
"type": "string"
},
"recorder": {
"$ref": "#/definitions/ResourceReference"
},
I do not want references , instead i want entire block here itself. I have tried below line of code but it does-not seems to be working.
var generator = new NJsonSchema.Generation.JsonSchemaGenerator(new JsonSchemaGeneratorSettings { AllowReferencesWithProperties = false });
I was able to do this by using Newtonsoft.Json package(see below code), but Newtosoft.Json had limitation of 10 schema generation per hour , i had to switch to NJsonSchema.
var generator = new JSchemaGenerator { SchemaReferenceHandling = SchemaReferenceHandling.None };
Is there any way i can have the entire block and not have it referenced using NJsonSchema.