Commit Graph

29 Commits

Author SHA1 Message Date
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
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
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
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
2d536c884d A few tiny non breaking changes.
just cleaning things up, preparing for online demo push for https://pb33f.io
2023-02-11 09:16:17 -05:00
Benjamin Nolan (TwoWholeWorms)
05d519c25f chore: Removes unused function we added but replaced with isInfiniteCircularDependency 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
cd63f66efe fix: Check for direct reference in IsPropertyNodeRequired 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
7338a614d0 refactor: FindKeyNode -> FindKeyNodeTop 2023-01-11 05:47:06 -05:00
Benjamin Nolan (TwoWholeWorms)
ee504c543a feat: Allow circular references when the properties are not marked as required 2023-01-11 05:47:06 -05: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
f61e731567 (fix): An off-by-one issue caused by a value exactly mapping a key #43
Non breaking change fix for #43
2022-12-13 08:52:30 -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
61beb3ea2a Schema what-changed almost complete.
Perhaps the biggest and most complex of all the models to determine what has changed.
2022-10-10 12:19:57 -04: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
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
7c2a65f640 Added responses and response test
also added a new null check utility, not sure we need it right now however, but it's there.
2022-08-16 08:51:59 -04:00
Dave Shanley
248b4daa80 We-worked model to remove resolver.
lookups are performed inline now. keeps things simpler, however it has a performance knock, so it's time to refine async building were possible.
2022-08-11 14:54:25 -04:00
Dave Shanley
4bb6a9ad49 Additional properties now supported. 2022-08-05 13:20:29 -04:00
Dave Shanley
a4012594de Building out model some more.
everything is holding up well.
2022-07-31 16:15:01 -04:00
Dave Shanley
2f60694047 Added tag model build out with tests.
Working through patterns and re-applying them as I go, cleaning things up as I cook.
2022-07-31 12:04:15 -04:00
Dave Shanley
7535cf568c Working through the model builder
Shaping out the design as I go, what makes sence, what feels right, what do we need, how do we want to use it and how to we want to search it etc.
2022-07-30 15:27:21 -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
eda834f79f Working on building out models
a recursive approach? or a dfs approach? not sure yet. still playing with ideas.
2022-07-29 09:44:37 -04:00
Dave Shanley
fd6263550b Utilities ported from vacuum. 2022-07-18 07:37:44 -04:00