Multiple polymorphic, deeply embedded schemas cause resolving issues as a channel waits forever due to a counting issue.
This has been resolved.
Signed-off-by: Dave Shanley <dshanley@splunk.com>
The example was not being pulled through correctly, it was throwing the whole low.NodeReference in there. This has been resolved now and the value of the example is correctly pulled through to the MediaType high level object.
Signed-off-by: Dave Shanley <dave@quobix.com>
A client of high-level SchemaProxy may want to know whether a schema
is a reference and the name of the reference. This information is
available from methods GetSchemaReference() and IsSchemaReference()
in low-level SchemaProxy. Provide a GoLow() method to retrieve the
low-level SchemaProxy for a high-level SchemaProxy.
A feature request from Travis Newhouse to make it easier to know which primitives have been set, and which have not. defaulting everything to 0 or false just doesn't work so well.
3.0 and 2.0 do not work, there are multiple versions and anything with a period in it sucks from my point of view, v2 and v3 feel much better from a DX perspective.
Model for v2 and v3 has been validated, now to build out a simple high level creation API, as well as port in 3.1 models (I think there are two). and this is ready for heavier testing.
There is a lot of overlap on these models, to create a much more sensible design, a new 'base' package has been added which contains shared models that both versions make use of.
there is a reasonable amount of shared structure, so a 'shared' package for high and low models is being introduced to prevent duplication and circular imports
working with k8s, stripe, petstore and locals. Speed is as good as I can make it at this point, not without further performance tunupes for memory consumption. less copying everywhere.
Schemas are now rendered on demand. There is no reasonable way to navigate the mayhem that is circular dependencies through multiple inheritance and polymorphism. So now using a msuch simpler design (and MUCH faster), there is a `SchemaProxy` for every schema reference. This holds a reference to the low model and index, that renders the schema on demand. Once rendered, it's done. Any children can also be rendered on demand, and so down the rabbit hole you do (if you want).
All circular dependencies are know by the index, so you can decide when you want to stop, or just keep going for ever, however it's now a choice, not something decided for you.
Signed-off-by: Dave Shanley <dave@quobix.com>
Using some designs unearthed from building the higher level model, I have brough that design down to the lower level to speed things up. It only took 8 years, but finally, I think I have mastered mult-threading. No more deadlocks, and no more need for waitgroups for everything.
this should actually be the full model, the whole graph is in - now to optimize full model and check for circular deps.
then, it's time to move back in history and rebuild the swagger model.