NJsonSchema icon indicating copy to clipboard operation
NJsonSchema copied to clipboard

root element of external schema ref files cannot be same name as any property of JsonSchema

Open jimfrederic opened this issue 3 years ago • 2 comments

No solution, just a failing test case to reproduce the problem.

jimfrederic avatar Mar 04 '21 21:03 jimfrederic

schema_named_title.yaml is not a valid JSON Schema... Is this even supposed to work (ie. should this be allowed)?

RicoSuter avatar Mar 05 '21 14:03 RicoSuter

schema_named_title.yaml is not a valid JSON Schema... Is this even supposed to work (ie. should this be allowed)?

The example is contrived, admittedly, cut down from a real-world OpenApi document to minimize it. So take a similar example: If you modify an existing test, changing myBool to Title here in collection.json and here in schema_with_collection_reference.json, then the test case When_schema_references_collection_in_definitions_it_works throws the same exception while parsing.

jimfrederic avatar Mar 05 '21 14:03 jimfrederic