A high level question:
Should we set $schema when marshaling our schemas, by default?
https://json-schema.org/understanding-json-schema/basics#declaring-a-json-schema
That increases the likelihood that the schema is interpreted correctly.
(relatedly, if the user sets $schema to a different value, we should probably marshal it accordingly -- see #4)