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

What defines a permitted key ? #284

Open
JulienPalard opened this issue Mar 22, 2016 · 2 comments
Open

What defines a permitted key ? #284

JulienPalard opened this issue Mar 22, 2016 · 2 comments

Comments

@JulienPalard
Copy link

I have a key named "URL" in a document, which looks good to me (an accronym should be all-caps, for me) but prmd verify whines about:

schema.json: #/definitions/video/properties: failed schema #/definitions/resource/properties/properties: "URL" is not a permitted key.

Why is that ? Is there a spec I missed telling allcaps properties are not permitted ? I did not see it while re-reading spec of json-schema and json hyper schema.

I also did not find where it is implemented in your code, so I can't tell why you did it that way, can you enlighten me please ?

@JulienPalard
Copy link
Author

Found it, here:

"^[a-z][a-zA-Z_]*[a-zA-Z]$": {

Where does this come from ? I don't see it in http://json-schema.org/hyper-schema

@geemus
Copy link
Member

geemus commented Mar 22, 2016

Good question. That definitely looks like where the error is coming from, but I'm afraid I don't remember why (and maybe it was an accident or is incidental).

@brandur it looks like the interagent hyperschema allows caps in properties, but enforces that the first letter be lowercase. Do you remember how/why that might be? Thanks!

tsrivishnu added a commit to tsrivishnu/prmd that referenced this issue Nov 30, 2016
tsrivishnu added a commit to tsrivishnu/prmd that referenced this issue Nov 30, 2016
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