json-schema-org / upgrade-downgrade-rules

A set of transformation rules to convert between JSON Schema specification versions
Other
2 stars 1 forks source link

Valid JSON reported invalid #34

Open notEthan opened 4 months ago

notEthan commented 4 months ago

I get "Error: Error processing schema: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data" for valid JSON, even as simple as {}.

Seems to be when a $schema key is absent? Even though it doesn't look like the tool uses the $schema value.

suprith-hub commented 3 months ago

@notEthan that was because jsonschema framing uses $schema that works now, maybe release again with all the tests working. Soon!

jeremyfiel commented 3 months ago

same as of today

suprith-hub commented 3 months ago

Hm... 😅, a slight mistake here and there while deploying, now I'll redeploy again and use schema myself if user doesnt provide, instead of throwing error: Any suggestions on this @jeremyfiel ..?

jeremyfiel commented 3 months ago

for a transformation tool, i don't think you can use a default $schema value because depending on the schema you choose, it can output different transformations. I would require the user to use one or at the very least, require them to select from the dropdown.

you have to be careful with the earlier drafts, as they didn't have $schema defined at all.