Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOT Enums Ignored - Supported by JSON Schema #2576

Open
kentbulza opened this issue Apr 27, 2024 · 3 comments
Open

NOT Enums Ignored - Supported by JSON Schema #2576

kentbulza opened this issue Apr 27, 2024 · 3 comments
Labels
enhancement New feature or request triaged

Comments

@kentbulza
Copy link

kentbulza commented Apr 27, 2024

To support reserved values, JSON Schema permits the use of "not":{"enum":[...]} syntax. However, nothing displays in Stoplight when this syntax is used. I've attached a sample OpenAPI 3.1 document to demonstrate.

not_permitted_value.json

I suppose this is a bug, but only if one decides all JSON Schema is supported.

Context

I'd like Stoplight to notate the non-permitted values. This is useful for situations like an endpoint that creates a new resource with a caller-defined code, but which has reserved values that cannot be used.

Current Behavior

Nothing displays for NOT enums.

Expected Behavior

Something should display.

Possible Solution(s)

Perhaps display these as strikethrough badges, e.g. the opposite of permitted enums.

@weyert
Copy link
Contributor

weyert commented Apr 29, 2024

As far as I know Elements doesn't support OpenAPI 3.1 documents yet?

@kentbulza
Copy link
Author

kentbulza commented Apr 29, 2024 via email

@brendarearden brendarearden added enhancement New feature or request triaged labels May 3, 2024
@daniel-white
Copy link
Member

this is an enhancement of stoplight's json-schema-viewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged
Projects
None yet
Development

No branches or pull requests

4 participants