49 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
2a68bc410c addressed issue #285
nill checks added to prevent explosions.
2024-07-08 10:14:32 -04:00
quobix
ede6b7e07a Added nil check to prevent panics 2024-07-08 10:14:32 -04:00
Thomas Rooney
2277a2030a chore: codecov 2024-07-08 10:13:49 -04:00
Thomas Rooney
626bca5ee4 fix: render empty scalar nodes 2024-07-08 10:13:49 -04:00
quobix
a12d27baf1 added more tests and added another panic check to node builder. 2024-05-17 17:19:46 -04:00
quobix
7648bdd72a Added length check to prevent panic. 2024-05-17 17:19:46 -04:00
Kellen Hart
a4a9370db8 render empty oauth scopes
see https://github.com/pb33f/libopenapi/issues/289
2024-05-11 14:49:40 -04:00
Emilien Puget
26e390b0f0 float format to not print !!float 2024-04-08 06:34:07 -04:00
quobix
cbdaac7374 cleaned up path handling a little
Signed-off-by: quobix <dave@quobix.com>
2024-01-04 17:08:08 -05:00
Tristan Cartledge
80177d9be7 chore: add more test coverage 2023-12-14 13:00:21 +00:00
Tristan Cartledge
212724df2d chore: some cleanup 2023-12-14 12:30:27 +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
76c9c2cafb added valid check to avoid a panic
Signed-off-by: quobix <dave@quobix.com>
2023-11-25 21:09:21 -05:00
quobix
198a47153b Added logic to ensure minumum and maximum are printed correctly.
If they are zero, but they are defined then do the right thing!

Signed-off-by: quobix <dave@quobix.com>
2023-10-08 12:27:52 -04:00
Shawn Poulson
dabfafa9ee Workaround to test error in ExampleNewDocument_modifyAndReRender.
Revert change to `Scopes` back to `map` type.
`orderedmap.Map` is not properly marshaling this one field from YAML.
2023-09-25 08:59:51 -04:00
Shawn Poulson
94adb8c064 Fix omitempty handling on components. 2023-09-25 08:59:51 -04:00
Shawn Poulson
f389fedadd Monster refactor of map to orderedmap.Map data type. 2023-09-25 08:59:42 -04:00
Dave Shanley
832f3765c9 Added zerocheck for node builder
was blowing up with some invalid specs.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-30 04:29:35 -04:00
Dave Shanley
f7901747e8 nil pointer check added to prevent panic.
When building docs from scratch, a slice that is not backed by a low level model could throw a NPE, now fixed.

non breaking change.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-06-21 09:08:44 -04:00
Dave Shanley
20ac2fb25a Adding more test coverage
Fixing some outdated code as well.

Signed-off-by: Dave Shanley <dave@quobix.com>

Cleaning up more coverage issues

Signed-off-by: Dave Shanley <dave@quobix.com>

More test coverage updates.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-06-17 14:12:27 -04:00
Dave Shanley
e1f0f69650 Original indention and text delimiter style retained when rendering #106
Now the original indention is captured and string delimiters are retained when rendering out documents.

Signed-off-by: Dave Shanley <dave@quobix.com>

# fixes 106
2023-06-17 14:12:27 -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
8549b1547a Added a stack overflow safe recursive variation of FindLastChildNode
Old method deprecated.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -04:00
Dave Shanley
dcfb480095 Fixed broken tests
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -04:00
Dave Shanley
0cdd99e257 Fixed some primitive handling issues
Discovered when upgrading vacuum and deeper integration with libopenapi and performing hundreds more tests.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -04:00
Dave Shanley
3055711f24 Added support for libopenapi-validator and bumped coverage.
Non breaking changes add support for the new `libopenapi-validator` module.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-22 09:50:44 -04:00
Dave Shanley
10374e801b Adding support for libopenapi-validator
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-22 09:50:44 -04:00
Dave Shanley
c549d9f62d Updated readme with new docs link
Added in some new helper methods for building out new models. More details in the docs. Added another example.
2023-03-26 06:10:31 -04:00
Dave Shanley
04eac2abe7 More hardening with digitla ocean
some ref handling was a bit strange, now it's rendering correctly. I have a feeling we will be back to the diff engine at some point soon, it's picking up some strange changes that are so deep in the model, I can't determine what is what, so we will wait for another set of triggers to appear.
2023-03-26 06:10:31 -04:00
Dave Shanley
bc5a020c7a Hardening is uncovering a few rough edges.
Some missing bits here and there are being picked up by the diff engine in tests. Working through each rough edge, one at a time.
2023-03-26 06:10:31 -04:00
Dave Shanley
cecee1ca73 Working through coverage
Fixing whack a mole issues as code is fully tested.
2023-03-26 06:10:31 -04:00
Dave Shanley
222a5706fe After a round of hardening, mutations are robust again.
Another round is required, but all tests passing again, new tests added. Coverage has dropped again, time for another coverage bump, more tests, more hardening.
2023-03-26 06:10:31 -04:00
Dave Shanley
5189eadddc Large refactor and addedGetAllChanges to each change
tons of updates, so many things.
2023-03-26 06:10:31 -04:00
Dave Shanley
0e8ae7c548 rendering complex additionalProperties in place.
slices of maps were not rendered properly. Now corrected, coverage continues to rise, refactoring node generation into utils package.
2023-03-26 06:10:31 -04:00
Dave Shanley
fd1f13aeed bumping coverage for node builder. 2023-03-26 06:10:31 -04:00
Dave Shanley
4870dcf495 Increasing node_builder coverage. 2023-03-26 06:10:31 -04:00
Dave Shanley
c3e962f527 adding more node builder coverage. 2023-03-26 06:10:31 -04:00
Dave Shanley
0e44dc90b5 Working through coverage on node builder. 2023-03-26 06:10:31 -04:00
Dave Shanley
5d7f22fca7 first level testing for rending v3 model in place.
Now onto some hardening tests, lets re-render each spec after reading to check for failures.
2023-03-26 06:10:31 -04:00
Dave Shanley
162d62a229 working through ordering edgecases.
making sure everything is rendered in order.
2023-03-26 06:10:31 -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
6a8c890056 Lots more v3 models are now mutable. 2023-03-26 06:10:31 -04:00
Dave Shanley
38c46fc9dd Added oAuth rendering, updated node builder. 2023-03-26 06:10:31 -04:00
Dave Shanley
3544ed0303 Churning through v3 models now.
mutations everywhere, for everyone!
2023-03-26 06:10:31 -04:00
Dave Shanley
38064123ed Working through complex rendering edgecases. 2023-03-26 06:10:31 -04:00