Commit Graph

55 Commits

Author SHA1 Message Date
Dave Shanley
b06ef4bcc9 Wiring up responses into what-changed feature
Building tests and hashing functions.
2022-11-18 11:00:34 -05:00
Dave Shanley
5bd0d8de50 Bumping coverage on low level models after new feature.
Fixed borked test
2022-11-18 11:00:34 -05:00
Dave Shanley
44b219a023 Fixed resolving bug with polymorphic schemas.
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>
2022-11-11 13:07:38 -05:00
Dave Shanley
98725586fa fix: Example on high-level MediaType object #6
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>
2022-11-07 08:41:22 -05:00
Daniel G. Taylor
5601ad1743 feat: add extensions to info 2022-11-04 13:20:04 -07:00
Dave Shanley
54d924d46d Enums in Schema are now interface{} types in datamodel #1
Addressing issues #1, Enums can be anything and should not be consideded plain strings.
2022-10-27 06:51:37 -04:00
Travis Newhouse
7d68d4f589 Add GoLow method to high-level SchemaProxy
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.
2022-10-25 12:55:22 -07:00
Dave Shanley
54316b4a00 Moved primitives to pointers in high-level schema.
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.
2022-10-25 07:23:02 -04:00
Dave Shanley
e80b640627 Added support for 3.1 docs and variations, as well as removed duplicated descriptions from sample spec. 2022-09-26 15:58:32 -04:00
Dave Shanley
6214babaec v2 low-level docs are now in also.
That is now 6/6! Time to tune up the README again next.
2022-09-21 09:24:40 -04:00
Dave Shanley
f9016b8414 Low-level docs for v3 model are now in place
5/6 of the way there!
2022-09-21 07:10:58 -04:00
Dave Shanley
be71a5e775 V2 low-base docs in place
refactored constants a little also to clean things up.
2022-09-20 10:08:31 -04:00
Dave Shanley
9d9592793d All v2 high-level docs are completed
Good docs, maketh the tool...
2022-09-19 09:13:50 -04:00
Dave Shanley
e52cc69bab Adding more docs to v2 swagger model.
once and done job, not much fun to be honest ;)
2022-09-18 13:07:07 -04:00
Dave Shanley
649a93b008 More v2 high-level docs
started including content from the schema to make it easier to understand when using the code as a complete guide, without pivoting to the spec.
2022-09-17 09:57:29 -04:00
Dave Shanley
c17cc4a7e6 Adding more docs to high level models.
Cleaning things that are not used.
2022-09-16 14:03:05 -04:00
Dave Shanley
cbce025d6c More docs going in, Added README details.
still lots to do, a long way to go, but it's starting to take shape.
2022-09-16 10:44:30 -04:00
Dave Shanley
3d5ecf0efb Refactored version directory names
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.
2022-09-16 08:33:39 -04:00
Dave Shanley
849074d0bc High-level base documentation is complete.
Examples and every model completed, 1/6th of the way through models.
2022-09-15 11:13:54 -04:00
Dave Shanley
b036982212 3.1 Support added to high models
webhooks and new multi-type models in place and coverage at 100%
2022-09-15 07:27:09 -04:00
Dave Shanley
5c93f3e28b Low level support for 3.1 model updates
Webhooks and dialect are now added and working.
2022-09-15 06:28:56 -04:00
Dave Shanley
19269af7d7 Added support for 3.1 updates to schema 2022-09-14 11:16:16 -04:00
Dave Shanley
8bd691b9bd Working through adding documentation to datamodel.
Adding examples and docs, A long way to go, but like always, we just keep chipping away.
2022-09-14 08:55:26 -04:00
Dave Shanley
d2b974829d Swagger v2 high model at 100% coverage. 2022-09-11 21:09:16 -04:00
Dave Shanley
02633ad333 Adding high base model tests
these were covered when used by v3 models, but need new tests when moved into a seperate package.
2022-09-11 13:10:32 -04:00
Dave Shanley
165b835f3e swagger with 100% coverage
so far, so good!
2022-09-11 12:12:27 -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
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
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
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
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
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
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