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

Support uniqueKeys in arrays #60

Open
dudicoco opened this issue Mar 15, 2022 · 4 comments
Open

Support uniqueKeys in arrays #60

dudicoco opened this issue Mar 15, 2022 · 4 comments
Labels
enhancement New feature or request requires-jsonschema-changes Needs changes or new features in the jsonschema library

Comments

@dudicoco
Copy link

Hi,

It would be very helpful if support for uniqueKeys was added, possibly via the following library: https://gregsdennis.github.io/json-everything/usage/vocabs-unique-keys.html

@sirosen
Copy link
Member

sirosen commented Mar 15, 2022

If I'm reading correctly, json-schema-org/json-schema-vocabularies#22 was resolved by the independent creation of a vocabulary by the original issue requester.

The python jsonschema library does not have full support for vocabularies yet. And even when vocabulary support is finished, it looks like this might require custom support anyway.

None of that means that this can't be done someday, but I don't see the pieces in place today to support doing this.

@sirosen sirosen added the enhancement New feature or request label Mar 15, 2022
@gregsdennis
Copy link

And even when vocabulary support is finished, it looks like this might require custom support anyway.

All vocabularies are going to require some custom logic to support. The vocab is the document that says what the keywords do. There may be a meta-schema that describes the syntax for the new keywords, but it can't describe the behavior.

@sirosen
Copy link
Member

sirosen commented Mar 15, 2022

Thanks, that's good to know. I haven't been keeping up with the latest drafts (2019 and 2020), so I'm not that familiar with the vocabularies feature. I'll have to read more about how jsonschema intends to support these kinds of usages.

@gregsdennis
Copy link

gregsdennis commented Mar 16, 2022

Vocabularies as a concept aren't going away anyone soon. Currently they're still somewhat prototypical, but usable. We're looking into ways we can allow implementations to automate some of their functionality, but for now it's purely declarative, and implementations need to either support a given vocab or refuse to process a schema that requires it.

I'm happy to answer questions when you get to that area of support (and so are the other contributors to the spec). A good place to contact us is on the JSON Schema Slack.

@sirosen sirosen added the requires-jsonschema-changes Needs changes or new features in the jsonschema library label Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request requires-jsonschema-changes Needs changes or new features in the jsonschema library
Projects
None yet
Development

No branches or pull requests

3 participants