A single line that tries to read an HTTP response body and fails is very hard to test without mocking, and the mock does not add value to a single line of code to check for an error that can rarely ever be triggered. Going to settle for 99.9% for now.
Same functions will power every other model. Found some opprotunities to add control over circular references, when and how to fire errors and what not. All in all, some robust code additions will improve the library significantly.
Building out models that have circular references is tricky. Particularly when they are polymorphic ones. The resolver now searches the polymorphic references for circular references as well (which is returning much more valuable results now). The low level model is now sensitive to this and will avoid building out anything that is circular.
I think it should be pretty much bullet proof at the moment (until the next failure). Also added external index lookups from main index for external docs. found this bug after refining lookups in schemas.
Stripe API is slowest to build at about 1.2s, the depth of the schemas on that spec are insane. The only way to speed things up here is to NOT wait for threads to finish before returning the model, and this creates a broken guarantee as the model won't be finished building by the time its returned to the consumer. When running tests against this - they fail randomly. depending on which thread reaches the finish first, before trying to be read.
This isn't an option, so for now, this is as fast as she will get, which is pretty good. 5ms for petstore and about 250ms for k8s.
sibling nodes with references were being destroyed when resolved. Copies are now made instead of using pointers for this specific item, as the fidelity is lost when using the resolver (the refs are resolved and there is no way to re-locate the original positon of the reference.