json-schema-org / json-schema-spec

The JSON Schema specification
http://json-schema.org/
Other
3.43k stars 251 forks source link

Update output to make the root object an overview with results contained inside #1487

Open gregsdennis opened 4 months ago

gregsdennis commented 4 months ago

This makes progress toward some of what is discussed in https://github.com/json-schema-org/json-schema-spec/issues/1065.

Basically, we need a place to include metadata about an evaluation. This PR wraps the existing output in a root node that can contains any such metadata.

(As a side effect, it creates a purpose for the root object in the case of the "list" format, which could have just been an array before.)

gregsdennis commented 4 months ago

Re-reading through the issue, it seems that dialect should be part of the output unit itself rather than the summary. Still... I think the summary root node is a good addition.

gregsdennis commented 4 months ago

I'll remove dialect from this PR and do another one for that then.

I know we had a discussion somewhere on having some more "global" details in the root node, though...