Closed netanel-mce closed 1 year ago
Thanks for the pull request. I think I prefer not to have an option and to just make compatibility with a newish draft the default. What do you think?
@domoritz Hello My PR currently throws errors when TSJ is enforced to generate non-standard schema, like top-level "undefined" which is strange, and unparsable by standard JSON schema validators. (like AJV) If that's acceptable, then I'll be happy to submit this PR without the switch.
I'm not following. Are you saying that we get errors if we generate non-standard schemas and that we currently do create those schemas? In that case I would strongly vote for making standard compliant output the default without a switch.
@domoritz Yes, that's the situation today, I'll remove the switch
I'm not following. Are you saying that we get errors if we generate non-standard schemas and that we currently do create those schemas? In that case I would strongly vote for making standard compliant output the default without a switch.
@domoritz done, all schemas should compatibility to draft-07.
Thank you
what is here
compatibility
to choose if output schema must to match to draft 07, ifdraft-07
is chosen, so:undefined
is not a valid fordefinition.type
, so:symbol
is not a valid fordefinision.type
, so we writeobject
insteadtypeof
fordefinition.type
only after check what returned from heDefinitionTypeName
for save ondefinition.type
draft-07
andnone