-
Notifications
You must be signed in to change notification settings - Fork 141
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
JSON Schema #55
JSON Schema #55
Comments
Not to my knowledge. Maybe you could write one big schema that takes every supported operation as an optional property, but I'm not sure the format lets you say "you have to have exactly one of this huge property list"... and it doesn't play nice with adding operations. What benefit do you expect from having a schema? |
|
Yes, indeed a JSON Schema would be awesome 🎉 |
This package is really great, unfortunately it seems that it isn't maintained anymore 😞 Therefore we forked it, rewrote it to ESnext and added JSON Schemas. @jwadhams |
Whoa, @AndyOGo – I was just evaluating Now if only the schema files were really hosted at the given URLs, my IDE (VS Code) could actually use them for validation 😏 |
Hmm. After playing with it a little more, I'm starting to wonder if this is as helpful as I had hoped. The schema validates anything, due to the inclusion of |
@yelworc and maybe it works if ACTUALLY IF I CHECK THE ORIGINALL CODE, IT SEEMS WOULD BE OKAY TO REMOVE Lines 209 to 219 in a15f528
Indeed But I agree with you it's rather paradox and makes these schemas kinda pointless. Also it is possibly to nest any operator within each other, but semantically this is pointless too. I would also really like to get the inventors feedback @jwadhams Edit: |
@yelworc |
@AndyOGo cool! This did fix one false negative I saw before ( Agreed, I'd appreciate some feedback by the maintainer, too; e.g. thoughts regarding a potential future major version with less permissive input handling. (I'm a bit concerned about the general maintenance status of the project, so I'm glad to see the activity in your fork!) |
Thank you all for your hard work, this is spectacular. I haven't been able to dedicate as much time to this library as I'd like. @AndyOGo I'll take a look at your repo and see if we're in a position to merge up. It looks like really great, thoughtful work. |
A year and a half later, any news? |
@jwadhams Thanks for all your help efforts with this library, and with the Json-Logic project in general. Is schema-support something you'd still consider? It would be great to have these schemas actually hosted at jsonlogic.com. I imagine this project is a labor of love, so I understand having limited time to devote to it, but I think this is a killer feature. |
Has any progress been made on this issue? I have recently been working on a schema for validating json logics components myself but I would prefer to check that against any other attempts out there if there are any. EDIT: Actually, I decided to upload my attempt at a json schema as pull request #136 . Tests so far seem fine, but I do not have the time or means to test every possible combination of expressions and arguments. |
Does an official JSON Schema (http://json-schema.org/) currently exists for json-logic syntax?
If not, do you think it would be possible?
The text was updated successfully, but these errors were encountered: