Incorrect default $schema identifier for JSON Schema draft-07
This was clarified in the linked issue by @relequestual
https://github.com/colinhacks/zod/blob/2381dafe7bb47a0354881567c8d8fbeb493e031f/packages/zod/src/v4/core/to-json-schema.ts#L725
https://github.com/microsoft/vscode-json-languageservice/issues/194
related #4390
Sorry, but what should it actually be?
including the hash
http://json-schema.org/draft-07/schema#
Damn, I missed that. Thank you good sir @jeremyfiel!
+ for some reason, the schema url uses https (when I tested in fastify, it doesn't work), it is incorrect as it doesn't match with ajv : https://github.com/colinhacks/zod/blob/e7f75d69389fa308ea49177dc53a4913fefe75d3/packages/zod/src/v4/core/to-json-schema.ts#L725
see https://stackoverflow.com/a/71943876/18644204, https://github.com/ajv-validator/ajv/issues/1104 and especially https://github.com/ajv-validator/ajv/issues/1966#issuecomment-1108485711
@colinhacks seems you updated the uri yesterday, but it's not matching the correct value I indicated above.
no https and the hash is missing.
it should be http://json-schema.org/draft-07/schema#
also @colinhacks (sorry for the ping), https://zod.dev/json-schema?id=configuration#configuration here both targets are marked as default in the docs, while from what I understand it's draft-2020-12 which is the real default
The $schema for draft-2020-12 is also incorrect.
The correct value is: https://json-schema.org/draft/2020-12/schema.