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

Custom namespaced object properties #587

Closed
brettz9 opened this issue May 17, 2018 · 1 comment
Closed

Custom namespaced object properties #587

brettz9 opened this issue May 17, 2018 · 1 comment

Comments

@brettz9
Copy link

brettz9 commented May 17, 2018

I've wanted to add some of my own meta-data within schema files but hesitated due to lack of a formal extension mechanism that would avoid future name clashes (and also allow schema tools the ability to selectively ignore these attributes while reporting errors with any other unexpected attributes).

Can some means be designed (akin to data-* attributes in HTML) to reserve a certain category of schema object properties which allows one to add properties without fear of clashes?

@handrews
Copy link
Contributor

@brettz9 I believe you're looking for #561 (vocabulary support). It's a more comprehensive solution to schema extensibility than reserving properties. TL;DR: vocabularies let you declare what sets of keywords you are using, whether they are from the standard, your own extensions, or a third party's, including both specific keywords and keyword naming patterns.

Informally, we're exceedingly unlikely to break the camelCase with initial lowercase letter (or, for core keywords, initial $) convention, so basically anything that doesn't follow that, including anything with hyphens, is safe.

@brettz9 brettz9 closed this as completed May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants