-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
docs: initial documents #1
Conversation
charter.md
Outdated
Definitions that should be clarified to align meaning. | ||
|
||
- **Validation rules**, i.e. a JSON Schema as such `{type: string}` define that data should validate against a string, it does not define that the data is a string. For small validation rules, there is almost no difference, but with more complex ones it becomes apparent. | ||
- **Data definition**, i.e. it defines the exact structure of the data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add any more definitions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start to me.
Co-authored-by: Jason Desrosiers <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested a change and requested a change, but broadly this looks great.
Additional requests:
- I'd like to see very clearly in the readme.md a project status section, making it clear this projec is just forming, and your immedate next steps (I guess that would be finding interested members). (We don't have to define a projects status workflow right now.)
- I'd like to see in the readme.md how you recommend people can get involved. Currently you've provide guidance on how to open a PR, but nothing about how to make proposals. This can be as light as opening an issue with a sepcific tag.
- Add a mention of the dedicated #vocab-idl Slack channel, with join link (Just made the channel now!)
If you have any thoughts on how you'd like the project to progress workflow wise, it could be beneficial to add that to the readme.md file too.
Co-authored-by: Ben Hutton <[email protected]>
Co-authored-by: Ben Hutton <[email protected]>
Great additions 👍 Gonna make the change as I mentioned in a comment, in a week or so 🙂 |
I'm going to add this here so it doesn't vanish when a review comment is resolved... The purpose of a JSON Schema Vocabulary is to add new keywords with specific expectaions and/or add provide meaning to existing keywords given specific different contexts. (This is explained more in the spec appendix.) My point is, you can add new keywords, and make them required, in order to use the vocabulary. A vocabulary is not just adding semantic meaning to existing keywords in another vocabulary, although it looks like you will mostly want to do that here. Schema authors will need to specify the dialect they are using via The result of this work can not be to define rules for processing existing schemas which use currently existing dialects (such as 2020-12). |
I think the development of this vocabulary will help evolve and refine our concept of what a vocabulary is.
Keep in mind that it's not enough to just introduce keywords and define semantics. We're going to need to define a whole new processing model. JSON Schema defines a processing model for validation that loosely speaking is something like
Hypothetically, I don't see any interoperability issues with using the 2020-12. When using the validation processing model, the validation semantics apply. When using the type generation processing model, the type-gen semantics apply. We need to take care to ensure that the semantics in both cases are compatible as a design goal, but I don't think that if we used the 2020-12 dialect (we won't) it would create an interoperability problem. |
FWIW, I believe this processing model should already exist in implementations. It's necessary for extracting identifiers ("$id", "$anchor" and "$dynamicAnchor" keywords) to enable the $ref-ability of schemas during evaluation * -- so one can hook into that process, or do the same steps separately, to walk a schema in order to identify items for code generation (or docs, or linting, etc). * at least, I believe it's required to do it that way -- if someone has achieved this in another way, I'd be interested in hearing how |
Yeah I agree with @karenetheridge here. There are no doubt some additional subtleties, but when I started playing around with generative cases at one point it was based on the schema loading step that found identifiers and resolved references against base URIs. |
I The way in which elements of the processing model work makes sense, as you both say, such as Say @jdesrosiers is right here in that this vocabulary will need to define a processing model, such as how to handle conditional applicators. The "applicator" phrasing may not even make sense in the context of code generation.
I can't think now, but I'm pretty sure I had a few things in mind which would make it very problematic. I should have written them down at the time.
Good good. |
@Relequestual I have updated the documents.
I agree that the suggestion in OAI will not be sufficient as something to be considered a full "solution", however without having the process specified as @jdesrosiers said The reason, why I have not talked much about the vocab side of things, is because to me the vocabulary is a supplement to the process model, at least here, in the beginning 🙂 The entire problem (from what I see) is that we have no way of processing validation rules to data definition that can be interpreted to code. One thing I have noticed is that trying to explain and discuss this topic ain't easy as we start to blend different explanations and expectations together, so it is important if you feel a specific word is misused or need further clearing that we document it, so we are aligned. And the wording is not my strong suit, so writing a process model in the terms of formal language is gonna be especially tricky. So please correct me anytime something does not make sense 🙂 Also in terms of getting started, how would you all suggest that this beast should be tackled? |
A mandatory constraining approach is not viable. However, neither is it likely viable to require all keywords to have meaningful, consistent interpretations in all languages.
Arguably a primary purpose of generative annotations is to disambiguate such constructs, such as With generative work, particularly for code generation, some constructs may be usable by some languages but unusable by others. This should also be fine. In terms of the processing model, each construct has a finite number of outcomes depending on the validation result of the construct. This can turn into a very large number of cases if you combine a lot of conditional-ish things, but they all break down into simple steps. The question then is "which of these cases are valid to generate" and "how must the cases be combined into a single code base." An |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change but otherwise looks good!
I'll make a PR on the readme =D
Please do 😆 Iterative improvements 💯 |
@all-contributors please add @Relequestual for review |
I've put up a pull request to add @Relequestual! 🎉 |
@all-contributors please add @jdesrosiers for review |
I've put up a pull request to add @jdesrosiers! 🎉 |
@all-contributors please add @jonaslagoni for doc |
I've put up a pull request to add @jonaslagoni! 🎉 |
@all-contributors please add @karenetheridge for ideas |
I've put up a pull request to add @karenetheridge! 🎉 |
@all-contributors please add @handrews for ideas |
I've put up a pull request to add @handrews! 🎉 |
This PR introduces the following
enabled
in the repository.I don't consider this "done" but could not create the PR as a draft, but would like to get your initial thoughts on these documents.