renderjson icon indicating copy to clipboard operation
renderjson copied to clipboard

feat: handle id/ref in json #35

Open andifreed opened this issue 5 years ago • 1 comments

This is how we solved the problem with microsofts $id/$ref graph reduction strategy. We basically replaced the objects with $ref with the referenced object. It also permits us to use the same navigation for json schema's id $ref.

andifreed avatar Jul 14 '19 04:07 andifreed

Crap, this isn't quite right, as the json schema example should merge the $ref as there are other properties that are might be there in the supplied example "required" : true.

So need to explore -- can I always merge (dropping the $ref) or only merge if there are unmatched properties (in the schema use case both will have "type" : "object" and match "id" to "$ref").

andifreed avatar Jul 19 '19 17:07 andifreed