Skip to content

Conversation

@P0lip
Copy link
Contributor

@P0lip P0lip commented Apr 7, 2021

Addresses https://github.com/stoplightio/platform-internal/issues/4350

Initially I wanted to address this directly in http-spec, but I quickly changed my mind, as this could potentially break certain usages. These 5 formats are OAS-specific, and JSON Schema does not support them, therefore the conversion we do includes correct ranges, so that generic JSON Schema tooling can interpret such a schema correctly.
Unfortunately, as a side effect, the values get inserted to the document, and JSV renders them.
The solution I decided to go with is rather simple. Since a format implies the valid ranges, we do not need to show it unless a given value was overridden manually.

To be ported to JST / JSV v4.

@P0lip P0lip added the enhancement New feature or request label Apr 7, 2021
@P0lip P0lip self-assigned this Apr 7, 2021
@P0lip P0lip marked this pull request as ready for review April 8, 2021 09:44
@P0lip P0lip requested review from a team and paulatulis April 8, 2021 09:44
Copy link
Contributor

@paulatulis paulatulis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me, so approving. If anyone else on @stoplightio/void-crew wants to take a look to sanity check me, please do!

@P0lip P0lip merged commit 06ed0c6 into master Apr 8, 2021
@P0lip P0lip deleted the feat/oas-formats branch April 8, 2021 14:13
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version 3.1.0 🎉

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

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants