Commit Graph

210 Commits

Author SHA1 Message Date
Dave Shanley
165b835f3e swagger with 100% coverage
so far, so good!
2022-09-11 12:12:27 -04:00
Dave Shanley
3d281f44df Fixed broken test after adding additional security def. 2022-09-10 14:46:19 -04:00
Dave Shanley
99588b0a9b Bumping coverage and fixing bugs in v2 model 2022-09-10 14:44:30 -04:00
Dave Shanley
14c5ad66bd Adding tests for v2 model 2022-09-10 13:49:47 -04:00
Dave Shanley
51d4e02adf 2.0 high level model completed
now it's time to test it and uncover all the bits I missed.
2022-09-10 13:11:16 -04:00
Dave Shanley
bfb312af15 Fleshing out high level model for v2 (swagger) 2022-09-09 12:22:21 -04:00
Dave Shanley
2c4177e97a Swagger 2.0 high level model going in now
Shifting a few high level models around that are also shared. now it's just a churn game to flesh the high level model and test it up.
2022-09-09 07:08:52 -04:00
Dave Shanley
6d21790a98 Coverage at 100%.
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.
2022-09-05 14:39:12 -04:00
Dave Shanley
0c5574d597 100% test coverage for v2 model
Swagger is now forever baked. thank god.
2022-09-05 14:22:45 -04:00
Dave Shanley
d57b9ca482 Fixed borked index test 2022-09-05 13:23:12 -04:00
Dave Shanley
eb7e60c412 2.0 model at 90% coverage
Error handling still required, but a nice jump.
2022-09-05 12:22:04 -04:00
Dave Shanley
1814ac58eb V2 swagger model in place
tests being written to validate and flush out bugs
2022-09-03 13:30:53 -04:00
Dave Shanley
8929db5868 Testing out mutation
works great! just as I expected. (this will be the) best openapi library out there!
2022-09-02 10:41:06 -04:00
Dave Shanley
c1c45a8362 Building out 2.0 low model 2022-09-02 10:38:14 -04:00
Dave Shanley
68743113ed Refactoring core structure of datamodel to accomodate v2 model.
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.
2022-09-01 08:53:16 -04:00
Dave Shanley
990ba78ca8 Building out Swagger / v2 models.
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
2022-09-01 07:52:08 -04:00
Dave Shanley
0e1a369027 fixed readme. 2022-08-31 10:57:40 -04:00
Dave Shanley
db09c475ab Added petstore as test
added back content prop r/w locks.
2022-08-31 10:53:44 -04:00
Dave Shanley
68e90d16cc Added a couple of null checks to v3 model
Asana spec was blowing up, now it's working as expected.
2022-08-31 10:50:20 -04:00
Dave Shanley
2d84cfd185 More channel waiting added to tests
Almost there!
2022-08-31 10:42:35 -04:00
Dave Shanley
6b1e408a9d Fixing channel test issue for spec info.
code never runs as test returns fast.
2022-08-31 10:37:53 -04:00
Dave Shanley
5d8c576131 removing ineffectual assignments in tests 2022-08-31 10:31:33 -04:00
Dave Shanley
d8c1750362 Adding metrics 2022-08-31 10:28:33 -04:00
Dave Shanley
816c008c85 Added code coverage to build workflow. 2022-08-31 10:11:52 -04:00
Dave Shanley
0de0c16c0c 99.9 % coverage & full OpenAPI v3 support
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.
2022-08-31 10:04:39 -04:00
Dave Shanley
62a7c88631 Bumping coverage on spec index.
cleaning up the left-over untested code from recent development.
2022-08-30 10:05:48 -04:00
Dave Shanley
4771f8d7e9 Datamodel now at 100% coverage
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.
2022-08-30 09:07:03 -04:00
Dave Shanley
983811e29f Model builder coverage now at 100% 2022-08-30 08:12:00 -04:00
Dave Shanley
916b6d410d Extraction functions now at 100% coverage.
Model builder is up next.
2022-08-29 16:19:37 -04:00
Dave Shanley
637e6e9988 bumping test coverage on extraction functions. 2022-08-29 10:07:18 -04:00
Dave Shanley
8a4bf811ba Working throught testing for extraction functions.
boring, but important.
2022-08-29 09:15:36 -04:00
Dave Shanley
8241d834ed Back porting updated schema coverage
ensuring circular references are handled. schemas won't ever care as they are always proxied.
2022-08-28 14:56:27 -04:00
Dave Shanley
2398f051b8 building out tests for extraction functions.
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.
2022-08-28 13:21:57 -04:00
Dave Shanley
61a1317ffd Building out extraction and location code.
adding tests to extactraction functions.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-08-27 13:21:20 -04:00
Dave Shanley
51e1f62b04 Test coverage for v3 model is now at 100%
This should be very easy to duplicate to 2.0 and 3.1, now extraction code needs testing.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-08-27 12:48:58 -04:00
Dave Shanley
c34c4f668c Massive refactor on how the library handles schemas.
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>
2022-08-27 09:47:37 -04:00
Dave Shanley
6e0d25776a Bumping test coverage
There are issues with circular references at scale, there may need to be a change after this commit.
2022-08-26 09:49:48 -04:00
Dave Shanley
081fc9be56 Bumping coverage across high level model
fixing small glitches as the model is tested. we're almost there! it's almost ready!
2022-08-24 11:26:39 -04:00
Dave Shanley
5d07da52b1 Fixed resolver to correctly identify polymorphic circular references.
Both stripe and k8s are correctly identified now.
2022-08-23 14:57:32 -04:00
Dave Shanley
447430256e Working through components tests
catching small gaps as I work through each model and checking coverage. Looks like it's time to expand on the spec again to ensure coverage.
2022-08-23 08:25:30 -04:00
Dave Shanley
108c3a93f3 Schemas now working, still need to check polymorphic work
However the painbarrier seems to have been smashed, now all polymorphic references can be tracked to circular references. confidence is now up 100%.
2022-08-22 11:13:43 -04:00
Dave Shanley
1a71f449ff Huge performance increase with building.
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.
2022-08-22 09:46:44 -04:00
Dave Shanley
6c2de6c151 The resolver just got an upgrade, polymorphic circular reference checking.
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.
2022-08-22 09:24:23 -04:00
Dave Shanley
00267c91b9 components are in,
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.
2022-08-21 12:05:16 -04:00
Dave Shanley
5a2f3ca924 Schema async work complete. 2022-08-20 17:45:14 -04:00
Dave Shanley
0c2c008902 Building out highlevel model
bit by bit, step by step.
2022-08-19 10:01:16 -04:00
Dave Shanley
0bd119f152 building out high model.
works just great, so happy the design came together!
2022-08-18 18:38:41 -04:00
Dave Shanley
0fd825aef8 High level model build is currently fast as lightning.
little refactoring to keep things all clean and in place.
2022-08-18 10:39:47 -04:00
Dave Shanley
10dbc203f6 v3 high level model foundation in place.
I think this API is going to be pretty sweet myself. Just what I've been looking for.
2022-08-18 09:41:44 -04:00
Dave Shanley
686b744852 Adding 3.0 high level models
The part most people will need, the most.
2022-08-18 07:51:55 -04:00