sourcemeta / alterschema

Convert between JSON Schema specification versions

Home Page:https://alterschema.sourcemeta.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't error if selected current schema value and `$schema` value missmatch

Relequestual opened this issue · comments

If a user selects 2019-09 but their pasted schema defines $schema: ...draft-04, then it IMHO it should throw an error.
It currently does not.

Yeah, that's a good point. Instead of throwing an error, maybe we can understand the default meta schemas and force-select the right "From"? I'll play with it

I would say that $schema needs to override a setting. Maybe if $schema exists, the setting can disable.

I sent a PR to inspect the contents of $schema and change the "From" automatically based on its value, if recognized.

The web-app will be re-deployed in a couple of minutes. Do let me know how it feels now!