Skip to content

Conversation

@P0lip
Copy link
Contributor

@P0lip P0lip commented Feb 4, 2020

@P0lip P0lip added the t/bug Something isn't working label Feb 4, 2020
@P0lip P0lip self-assigned this Feb 4, 2020
@P0lip
Copy link
Contributor Author

P0lip commented Feb 4, 2020

Done
In general typings need some love in json-schema-viewer.
It became quite a bit of a hassle once we started addressing all the weirdness and quirkiness.
chore/typings branched my work off here, gonna polish it one day, mostly to utilize tagged union literals and being more careful about malformed data.
I believe we need to take a similar approach as in case of http-spec and assume invalid data is passed rather than the data meets our expectations.

@marbemac
Copy link
Contributor

marbemac commented Feb 4, 2020

I believe we need to take a similar approach as in case of http-spec and assume invalid data is passed rather than the data meets our expectations.

Or we add a transformer to http-spec package to "clean/normalize" json schema to make it valid, so that our entire ecosystem doesn't have to worry about these issues.

@P0lip
Copy link
Contributor Author

P0lip commented Feb 4, 2020

Or we add a transformer to http-spec package to "clean/normalize" json schema to make it valid, so that our entire ecosystem doesn't have to worry about these issues.

That would be some solution as well, but wondering how it'd impact the perf of large schemas processing. If the hit isn't significant, I'd be all in for bringing it to JSV, as right now we kind of need to do the same stuff twice.

@P0lip P0lip merged commit de7a986 into master Feb 4, 2020
@P0lip P0lip deleted the fix/nullish-items branch February 4, 2020 08:22
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 2.11.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released t/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants