Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

clarify that type must be a non-empty array #1560

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

Merged
gregsdennis merged 1 commit into main from gregsdennis/clarify-type-array
Nov 28, 2024

Conversation

@gregsdennis
Copy link
Member

@gregsdennis gregsdennis commented Nov 12, 2024

What kind of change does this PR introduce?

clarification

Issue & Discussion References

Summary

Clarifies that type as an array must be non-empty.

Does this PR introduce a breaking change?

Technically yes? @awwright did point out that there is a niche use case as an alternative to {not:{}}, but the keyword certainly wasn't intended to be used this way. Also, given that we present {not:{}} as the analog to false, it's extremely unlikely that anyone will be using it this way on purpose.

Copy link
Member

@jviotti jviotti left a comment

Choose a reason for hiding this comment

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

This is great. All of these edge cases and what is technically possible can be very confusing.

Copy link
Member

@jdesrosiers jdesrosiers left a comment

Choose a reason for hiding this comment

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

I'm a little reluctant to approve a breaking change without documented consensus and an ADR, but I think it's ok in this case because the support for type with an empty array was never reliable because the meta-schema has included "minItems": 1 since at least draft-04 (I didn't bother looking further back). That means that implementations that use the meta-schema to validate schemas (probably most of them) have been rejecting type with an empty array.

@gregsdennis gregsdennis merged commit c6a845b into main Nov 28, 2024
6 checks passed
@gregsdennis gregsdennis deleted the gregsdennis/clarify-type-array branch November 28, 2024 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jdesrosiers jdesrosiers jdesrosiers approved these changes

@jviotti jviotti jviotti approved these changes

Projects

Development

Successfully merging this pull request may close these issues.

Spec and meta-schema seem inconsistent w.r.t empty "type" array

AltStyle によって変換されたページ (->オリジナル) /