Commit Graph

442 Commits

Author SHA1 Message Date
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
148822fa2a Added support for references with brackets #112
Brackets in names are now supported. For example `’#/components/schemas/CoffeeCup[Black]’

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-06-17 14:12:27 -04:00
Dmitry
fa337646da Use EqualFold ti avoid memory reallocations 2023-06-17 13:13:15 -04:00
Derrick J. Wippler
a09916eb67 fix: Schema.Minimum and Schema.Maxmium are now float64 2023-06-17 13:12:50 -04:00
Tristan Cartledge
06f6b243a8 fix: add missing path and parent node to paths index references 2023-05-30 09:20:56 -04:00
marclave
93f591d4a4 fix: add test coverage to document and paths 2023-05-25 06:36:03 -04:00
marclave
2777dcc4ad fix: add test coverage 2023-05-25 06:36:03 -04:00
marclave
bdc6038722 feat: add foundation for marshalyamlinline and render inline 2023-05-25 06:36:03 -04:00
Dave Shanley
230f8fdd02 Added new extraction functions to control extensions
New extraction functions added (that just wrap the old ones). The difference here is that the extensions can be included or ignored now. This has been added to address issue #24 where header keys can in fact include an extension prefix.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-05-17 09:38:18 -04:00
Dave Shanley
08f596058f Cleaning up some tests after ancestor lookup code added.
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-05-16 17:03:02 -04:00
Dave Shanley
f629c0ff58 fix for resolving looping relative references
In vacuum, a usecase was reported where an infinite loop occurred due to re-parsing the same reference over and over in a loop. It was re-creatable and it was because the loop happened before the index was ready.

This should be resolved now, at least for this use case. To be sure, I have included the specs as a new test.

https://github.com/daveshanley/vacuum/issues/268
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-05-16 17:03:02 -04:00
Dave Shanley
08c9ca8c26 Added another test to check slices of bools in model_builder
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -04:00
Dave Shanley
f339dc0125 fixed broken test for model_builder
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -04:00
Dave Shanley
f2104552f4 Bumped coverage back up for model_builder
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -04:00
Dave Shanley
1f9a8bd185 Schema tests updated with fixes.
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -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
26e694a5e9 Updated embedded OAS schemas and fixed UniqueValues
UniqueValues was marked as an integer, not a boolean.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-30 09:01:15 -04:00
Dave Shanley
736fbfd0c3 Updated readme
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-04-23 11:47:16 -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
9edb995d12 Support for DynamicValue inline rendering.
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
eec0c71092 Added some URL checking to index URL extraction.
In the case of relative files, the first arg won’t be a URL, so this ensures both relatitve and full references work.
2023-04-22 09:50:44 -04:00
Dave Shanley
24d094ca7b Corrected remote document lookup behavior
When remote documents are requested and there is no way to know the base URL, the index will now try and determine the base path from the way the spec was loaded (if it comes in remote, we use the base URL of the spec)
2023-04-22 09:50:44 -04:00
Dave Shanley
ec83a9ca9b Removed duplicate test, getting absue errors from github 2023-04-22 09:50:44 -04:00
Tristan Cartledge
1cbec05c5a doc: add speakeasy cli tool as a project that uses libopenapi 2023-04-21 07:39:25 -04:00
Tristan Cartledge
99bf12c1c7 feat: add attribute to schema model 2023-04-18 05:22:49 -04:00
Dave Shanley
4c331de207 returned codecov 2023-03-26 06:24:34 -04:00
Dave Shanley
60221e639f Re-enabling codecov
using new action.
2023-03-26 06:19:59 -04:00
Dave Shanley
67f5595778 Update workflow to remove codecov
The app is installed in the repo, so now there is no need for this integration.
2023-03-26 06:10:31 -04:00
Dave Shanley
1bc04418db More coverage tuning 2023-03-26 06:10:31 -04:00
Dave Shanley
33bd9621c5 Small coverage bump. 2023-03-26 06:10:31 -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
cd3011655c Coverage bumped again
however, more hardening is required, Asana is getting upset with changes found when rendering, so that's up next. Then, we will need to harden against few others.
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
0b8fab869e working through code coverage 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