Commit Graph

22 Commits

Author SHA1 Message Date
Tristan Cartledge
161a41f73b chore: update to use iterators on orderedmaps 2024-08-26 20:42:40 +01: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
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
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
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
f389fedadd Monster refactor of map to orderedmap.Map data type. 2023-09-25 08:59:42 -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
Federico Bevione
572130c666 add test, fix RemoteURLHandler field name 2023-06-30 13:24:16 -04:00
Dave Shanley
c3cf5f1e38 Added support for unevaluatedProperties as Schema and bool #118
Also ran `gofmt` across the entire project. Things need cleaning up.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-06-17 14:12:27 -04:00
Dave Shanley
3101a7c9b7 Large update to support v3 rendering. 2023-03-26 06:10:31 -04:00
Dave Shanley
000eada3f4 more mutable objects, more tightening up 2023-03-26 06:10:31 -04:00
Dave Shanley
b5436e8d4e (feat): Added Reference tracking to low-level model #25
When building a document, everything that IS NOT a schema is auto-resolved in the model, this is very convenient because it creates a nice tree to explore and there is no need to perform lookups to when using `$ref` instead of inline definitions.

The issue is however being able to determine if the node was originally a reference or not, that data was lost, including the name of the reference used. This use case surfaced in issue #25, where the need to know what is and what is not referenced has different requirements for different applications.

This update now tracks that data and makes it available in `NodeReference` and `ValueReference` for every property.

Signed-off-by: Dave Shanley <dave@quobix.com>
2022-12-03 12:30:31 -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
aa62232440 v3 Links, callbacks operations low level models at 100% coverage 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
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