Commit Graph

36 Commits

Author SHA1 Message Date
Tristan Cartledge
161a41f73b chore: update to use iterators on orderedmaps 2024-08-26 20:42:40 +01:00
quobix
61b8a2f934 fixed path node extraction.
This one of the exceptions.
2024-08-05 15:01:37 -04:00
quobix
70f406b6cf Added NodeMap to all low level objects.
this sync map tracks all the nodes that apply to this object.
2024-08-05 09:29:07 -04:00
quobix
93c5b25d6c Added GetRootNode() and GetKeyNode methods to low model. 2024-07-08 10:14:32 -04:00
quobix
a53b3f8a13 tweak for visual clarity
Signed-off-by: quobix <dave@quobix.com>
2024-01-04 17:08:08 -05:00
quobix
5c04bb1494 Added root node into all low level models.
Signed-off-by: quobix <dave@quobix.com>
2024-01-04 17:08:08 -05:00
quobix
63354654bf added in keynode support
soemthing that has been waiting to be filled in for some time.

Signed-off-by: quobix <dave@quobix.com>
2024-01-04 17:08:08 -05:00
Tristan Cartledge
eb0b10cbb6 fix: to callback path items ref issue 2023-12-04 17:50:44 +00:00
Tristan Cartledge
a4ad09aab3 fix: continued moving everything to orderedmaps plus cleaned up most the tests 2023-12-01 17:37:07 +00:00
Tristan Cartledge
2de65e4ca0 Merge branch 'main' into Baliedge/PIP-2552-consistent-ordering 2023-11-27 12:06:39 +00:00
quobix
ac80716553 A few small bugfixes discovered from online users of openapi-changes
someone caused a panic, exposed an untested bug.

Signed-off-by: quobix <dave@quobix.com>
2023-11-17 07:08:09 -05:00
quobix
d096163f0e Deleting old code that cannot be run anymore.
Signed-off-by: quobix <dave@quobix.com>
2023-11-01 14:04:13 -04:00
quobix
6e9db7f838 A massive test update to bring everything inlne with the new Buildable signature.
All tests in index and datamodel now pass. The rolodex fixes all the things.

Signed-off-by: quobix <dave@quobix.com>
2023-10-23 18:18:44 -04:00
quobix
8717b3cd33 An enormous amount of surgery on the low level model.
Every `Build()` method now requires a `context.Context`. This is so the rolodex knows where to resolve from when locating relative links. Without knowing where we are, there is no way to resolve anything. This new mechanism allows the model to recurse across as many files as required to locate references, without loosing track of where we are in the process.

Signed-off-by: quobix <dave@quobix.com>
2023-10-23 15:04:34 -04:00
Shawn Poulson
663cb90b67 Improve coverage. Simplify error handling. 2023-10-05 09:30:28 -04:00
Shawn Poulson
e2da992488 Tidy code. 2023-10-05 09:30:28 -04:00
Shawn Poulson
9562230084 Tidy code. 2023-10-05 09:30:28 -04:00
Shawn Poulson
0cb53c5558 Refactor v3 Paths to parse YAML using TranslatePipeline.
Fix goroutine resource leak in `datamodel/low/v3/path_item.go`.
2023-10-05 09:30:28 -04:00
Shawn Poulson
f389fedadd Monster refactor of map to orderedmap.Map data type. 2023-09-25 08:59:42 -04:00
Shawn Poulson
652e818456 Refactor Paths to OrderedMap. 2023-09-22 17:51:21 -04:00
Shawn Poulson
8b6ea5a979 Improve coverage. Simplify error handling. 2023-09-22 17:49:17 -04:00
Shawn Poulson
a9a28759a4 Tidy code. 2023-09-22 17:49:17 -04:00
Shawn Poulson
3512e706b4 Tidy code. 2023-09-22 17:49:17 -04:00
Shawn Poulson
5918b8a187 Refactor v3 Paths to parse YAML using TranslatePipeline.
Fix goroutine resource leak in `datamodel/low/v3/path_item.go`.
2023-09-22 17:49:17 -04:00
Dmitry
6c24cd5940 Pass the key node 2023-08-25 09:51:57 -04:00
Dmitry
55da120b19 Add dummy parameter to conform to Buildable 2023-08-25 09:51:57 -04:00
Dave Shanley
25d8de9b0e Added more support for YAML merge nodes, anchors and aliases
And added deeper support for Aliases. Also added in local file handling through renamed `FSHandler` configuration property for the index.

Also re-ran `go fmt`

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-16 11:45:18 -04:00
marclave
bdc6038722 feat: add foundation for marshalyamlinline and render inline 2023-05-25 06:36:03 -04:00
Dave Shanley
3101a7c9b7 Large update to support v3 rendering. 2023-03-26 06:10:31 -04:00
Dmitry
69d99c7046 Properly extract references if they are file refs 2023-03-26 05:37:17 -04:00
Dave Shanley
f8ae5759d0 Couple of small fixes for what-changed.
No breaking changes, errors and model are returned now (allows errors and model through). And a small fix to the paths hashing mechanism to ensure identical paths with different names are checked.
2023-01-18 07:02:51 -05:00
Dave Shanley
c08dd591b2 (feat): Unpack extensions into complex function types #8
The more in-depth we use extensions, the more likely is is that we need custom extensions. New `UnpackExtensions` function in the high package makes this easy. Low level models have been updated to support feature fully and docs added in README and examples as well.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-12-02 11:15:44 -05:00
Dave Shanley
94aabf4928 Cleanup of remaing extension hashing
extension hashing is now accurate across the v2 and v3 low level models.
2022-11-18 11:00:34 -05:00
Dave Shanley
a522ec0f91 Paths added to what-changed feature
bubbled right up to the top and all the hard bits are done! components/defs are up next, however before that - we have to clean up some of the test coverage carnage appearing in our model after so much feature work.
2022-11-18 11:00:34 -05:00
Dave Shanley
a184c5e909 Fixed a low level bug with locating nodes.
locating nodes was looking through two levels to locate something. This is not the correct behavior, after making the change - lots of tests needed to be updated to be correct in what they put into as a the root node.
2022-11-18 11:00:34 -05: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