YousefED / typescript-json-schema

Generate json-schema from your Typescript sources
BSD 3-Clause "New" or "Revised" License
3.17k stars 323 forks source link

Compatibility to draft 07 #537

Closed netanel-mce closed 1 year ago

netanel-mce commented 1 year ago

what is here

domoritz commented 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?

netanel-mce commented 1 year ago

@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.

domoritz commented 1 year ago

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.

netanel-mce commented 1 year ago

@domoritz Yes, that's the situation today, I'll remove the switch

netanel-mce commented 1 year ago

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.

domoritz commented 1 year ago

Thank you