I am new to JSON Schemas and would like to generate C# code from a given JSON Schema, but I am having trouble getting useful code out of the NJsonSchema code generator.
It works for some classes but not for others. I skimmed through the settings NJsonSchema offers but could not find anything that seemed to be related to my problem.
I am attaching a simplified example here. The "BuildingSurface:Detailed" property seems to give me what I need but the "Building" is converted to a generic object, and no "Building" class is generated in C#.
Any pointers would be greatly appreciated.
A more minor issue is that the "BuildingSurface:Detailed" class is named to "Anonymous" instead of something like "BuildingSurfaceDetailed". Is it possible to have it pick up the property name used in the Schema?
I am new to JSON Schemas and would like to generate C# code from a given JSON Schema, but I am having trouble getting useful code out of the NJsonSchema code generator. It works for some classes but not for others. I skimmed through the settings NJsonSchema offers but could not find anything that seemed to be related to my problem.
I am attaching a simplified example here. The "BuildingSurface:Detailed" property seems to give me what I need but the "Building" is converted to a generic object, and no "Building" class is generated in C#. Any pointers would be greatly appreciated.
schema_code_example.zip
A more minor issue is that the "BuildingSurface:Detailed" class is named to "Anonymous" instead of something like "BuildingSurfaceDetailed". Is it possible to have it pick up the property name used in the Schema?