- Notifications
You must be signed in to change notification settings - Fork1.7k
Handle allOf, anyOf, oneOf, and not by repeated merging of properties.#1720
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
… needing to worry about cycles in the graph.This is initial demo is no were near complete, but does should the idea of repeatedly applying a transform to the schema graph to scatterproperties until no more changes result from the transform process. This algorithm is parallelizable in both the gather and scatter steps.To install this, we would need to place it between the rules and the SchemaStore. A function for loading documents would also need to be added that could load documents after a step where the document was needed but not already loaded.
ctrimble commentedOct 4, 2025
@joelittlejohn@unkish this PR is still just a test demo, but we could put something like this into the project. For now, please keep any feedback to issues with viability. I have cut a ton of corners (added builder generator, using Commons Lang Tuples, etc.). We can change those thing later. The purpose, for now, is just to get something concrete to react to. I am thinking we can turn this into a wrapper around the SchemaStore, so that the rest of the project doesn't need to understand this change. We could flip this feature on and off by installing an identity transform, instead of a transform that expands properties, so it could live in the project for a while as an experimental feature. This would change the behavior of the project a little, since document loading would move to the transform, instead of when a rule encountered a |
…ormations.naming improvements.
ctrimble commentedOct 12, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I have been working on a set of transforms that we can use to handle There is no good way to erase this This would result in a Java object being generated with a Personally, if a bunch of time is going to be invested into getting these keywords to work, I would like it to make my life extremely easy when using the project's output. I think that would include creating a set of |
ctrimble commentedOct 12, 2025
I am going to get the code I have cleaned up and pushed. Then I am going to open a competing draft where these keywords are implemented in the existing rules. My gut is telling me that getting an easy implementation of these rules will require adding some kind of extra model that is a little closer to the Java we are trying to generate, but not as concrete as CodeModel. |
…f and not keywords.
…ot support refs. Itis most likely overly complicated at this point, since refs inlining will not work, there is most likelyno reason to do multiple transformation passes.
ctrimble commentedOct 13, 2025
I pushed some transform examples and an example of a TransformingSchemaStore. Since it appears that inlining |
This PR shows how we could scatter properties from keywords like
allOfinto the containing schema. The algorithm will work in parallel and will handle cyclic references that may exist in the schemas. The idea is to place something like this between the schema store and the existing rules, converting these keywords into schemas with all of their properties expanded.The current implementation contains a
maxStepsproperty, but we could convert this into amaxSeconds, if we want to bound the algorithm by time as opposed to complexity of the schemas.