-
-
Notifications
You must be signed in to change notification settings - Fork 310
Appendix on vocabulary plugin architecture? #995
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
Comments
Importantly, all of this can be done at the keyword dependency level. Additional optimizations are possible and of course would not be forbidden. But fundamentally, you can do this by loading keyword dependencies (presumably when the vocab is loaded) and then keeping track of which keywords have been evaluated. A variation of that is noting which keywords depend on in-place applicators, and which keywords are in-place applicators. With that info, you can:
In all steps, "evaluating" a keyword means passing it to each vocabulary handler. As an optional step, one could track which handlers handle which keywords and then you don't have to call every handler for every keyword. The key thing is that it's keyword by keyword, not vocabulary by vocabulary. Particularly when it comes to in-place applicators, requiring things to be done at the vocabulary granularity will create deadlocks. |
As a guide for developing additional/replacement vocabularies, a separate document is fine. But some of these items will need to be specified for the existing vocabularies as well, in which case they should be in the specification itself.
How so? |
It depends on exactly how things are arranged and I do not have the energy to sort it out. Maybe it's possible, but that's not the point. The point is to make things at the keyword granularity because that's conceptually simpler and more flexible, and robust to changes in vocabulary such as the one splitting the |
I like the idea of including the principle design decisions behind vocabularies, but I think we should be careful to not go too far and prescribe implementation choices. I'm not saying that's what you're doing, but the line can be fuzzy sometimes and we might end up imposing more than we intend if we aren't careful. Here are the principle design decision I've made in my implementation. I take this perspective not to make it about me or my implementation, but I figure if we have two sets "fundamental" principles, we're more likely to identify what's truly fundamental and what can be a degree of freedom. Principle Design Decisions for Hyperjump JSON Schema Vocabularies
There's plenty of overlap, so that's great! For example
I think our main difference is that I'm much more strict about statelessness of keywords. Effectively, that means I don't use annotation to handle keyword interactions. Maybe I just made an extreme design choice, but it's worth thinking about whether annotations are truly a fundamental concept considering I was able to implement everything without them. The other thing that doesn't appear in my list is keyword taxonomy. The taxonomy is nice to give us names to talk about things, but I haven't found a use for them in code. This may be another thing that is not fundamental other than as an ontology to describe things.
This is the other place we differ. I may be misunderstanding. If two vocabularies include the same keyword name, this algorithm would require both to be valid for the keyword to be valid. This seems to be defining a behavior for conflicting keyword names, but the spec considers that behavior undefined.
I'm not sure what these mean. |
@jdesrosiers an issue about a stopgap to get us through the next draft is not a place to open a discussion on replacing the entire theoretical model that I've spent the last several years developing. Y'all are truly welcome to throw anything and everything I've one out after the draft that goes out with OAS 3.1 final. I had mostly stepped back but then @Relequestual told me OAS 3.1 was imminent and we needed to wrap up the draft ASAP so I am doing my best to handle all of the loose ends I've left. But, in the middle of the world going to shit, and taking my already shaky mental health with it, I am not in any shape to deal with this kind of "hey throw everything out and reconsider it" right now. Again, feel free to do so after I'm done with this and more or less off the project. I truly will not feel hurt over it: I picked up the ball and carried it a certain amount. The work is not done, and the final product may lie in a new direction. But. Not. Now. I'm closing this, I cannot deal with this topic right now and don't want it to progress at all- I apologize for not addressing your work here, @jdesrosiers but now is really, really, really not the time. Let me finish this and get out of the way, please. |
(those with permission to keep commenting despite the lock, please don't- I will make a comment on Slack momentarily about both the technical and personal issues mentioned here) |
Recent discussions have made it clear that we need some consensus on the interface to / capabilities of vocabulary handling modules. Perhaps an appendix? Or maybe on the web site?
For me, the fundamentals are....
It may be necessary to do one or more of the following in order to get keywords evaluated in the right order:
The text was updated successfully, but these errors were encountered: