Commit Graph

34 Commits

Author SHA1 Message Date
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
466ea3264d fixed test 2024-07-09 13:44:55 -04:00
quobix
425b25cdd0 Added a nill check to lookup.
was causing vacuum to crash during testing.
2024-07-09 13:44:55 -04:00
quobix
c2b58717b8 Addressed issue with anchors and merge nodes
Highlighted in https://github.com/daveshanley/vacuum/issues/508

The comment from @Jakousa annoyed me. Rude.
2024-07-08 10:14:32 -04:00
quobix
8506d1dc86 updated regex for path conversions 2024-07-08 10:14:32 -04:00
quobix
65422f0c58 Added coverage, removed dead code from path utils 2024-07-08 10:14:32 -04:00
quobix
f33aa2fee0 Tuning up path -> component -> path tooling 2024-07-08 10:14:32 -04:00
quobix
43860f4e3c Added some new getters to the index
Also added map conversion utilities based on reported vacuum error https://github.com/daveshanley/vacuum/issues/417
also prevented the bundler from inlining root references.

Signed-off-by: quobix <dave@quobix.com>
2024-01-18 15:11:39 -05:00
quobix
62ed25052a Added of by one check and test
Signed-off-by: quobix <dave@quobix.com>
2024-01-18 15:11:39 -05:00
quobix
202ae3365a updated coverage for timeout path lookup
Signed-off-by: quobix <dave@quobix.com>
2024-01-04 17:08:08 -05:00
Tristan Cartledge
69ba5b875a feat: add ordered json 2023-12-03 22:28:15 +00:00
quobix
ff40cfad85 Off by one issue fixed https://github.com/daveshanley/vacuum/issues/356
Reported by vacuum issue, this use-case is now handled correctly and prevents a panic.

Signed-off-by: quobix <dave@quobix.com>
2023-11-05 09:21:29 -05:00
Nicholas Jackson
def8e997b2 Fix lint issues in util
Reduce execution time of ConvertComponentIdIntoFriendlyPathSearch by
50-60% and add benchmark

Signed-off-by: Nicholas Jackson <nickajacks1@gmail.com>
2023-11-04 12:00:19 -04:00
quobix
8699cf4910 Added a little coverage and working on config design
adding new properties to top level configs should work nicely.

Signed-off-by: quobix <dave@quobix.com>
2023-09-21 06:01:23 -04:00
Dave Shanley
3ebc702deb Added some more tests to bump coverage back up.
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-16 11:45:18 -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
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
5b128c098a Added support for original format rendering #105
Original input document types are now rendered automatically as JSON or YAML (vs always being YAML). This only operates at the `Document` level for rendering out entire documents.

Requested in #105

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-06-17 14:12:27 -04:00
Dave Shanley
db27267e09 bumping test coverage, adding more tests.
Signed-off-by: Dave Shanley <dave@quobix.com>
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
Derrick J. Wippler
a09916eb67 fix: Schema.Minimum and Schema.Maxmium are now float64 2023-06-17 13:12:50 -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
8dff96ad90 Cleaning up some coverage and a few bits. 2022-12-15 16:31:32 -05:00
Dave Shanley
32f48385f2 (enhancement): Improved resolving/lookup code for #45 2022-12-15 16:31:32 -05:00
Dave Shanley
05eb4ffec9 (patch): Some crazy references are causing panics. #48 #45
This patch bumps up support for creating valid JSON paths from references. It addresses #48 and makes invalid specs, valid! This addresses issues #48 and #45 that report references cannot be found. Now `libopenapi` can support much more funky lookups.
2022-12-15 09:47:23 -05:00
Dave Shanley
59bf83c446 Supercharged test coverage back up to 99.9%
I can't test that one line in the index, so this will do.

Now to complete the document for what's changed.
2022-11-18 11:00:34 -05:00
Dave Shanley
77ecbd418f Updated model builder to use lowercase checks only. **breaking change**
The case checking seems kinda dumb now looking back at this code. I am not sure why I felt the need to do that, however after being aware of it for some time and not being happy with the extra cycles it puts the code through.

This change removes ConvertCase from the utils package, as it's no longer used or needed right now. If it needs co come back, we can re-add the code, but deleting code always makes me happy.
It also removed a dependency from the project, which reduces the footprint, great!
2022-11-18 11:00:34 -05:00
Dave Shanley
647541cc77 Added in high document API
filling out documentation, looking at DX and how to consume things, re-shuffling and cleaning house.
2022-09-13 08:39:38 -04:00
Dave Shanley
5d8c576131 removing ineffectual assignments in tests 2022-08-31 10:31:33 -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
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
4e3a5584c3 Adding more model building code.
Seems to be working pretty well so far.
2022-07-30 08:56:09 -04:00
Dave Shanley
fd6263550b Utilities ported from vacuum. 2022-07-18 07:37:44 -04:00