Commit Graph

105 Commits

Author SHA1 Message Date
quobix
be2552e623 added corverage for new rendering
Signed-off-by: quobix <dave@quobix.com>
2024-02-20 13:34:39 -05:00
quobix
a6c5bdaf28 added custom renderer for change types.
Signed-off-by: quobix <dave@quobix.com>
2024-02-20 13:34:39 -05:00
quobix
68c702dd7d added new flat doc model.
Signed-off-by: quobix <dave@quobix.com>
2024-02-20 13:34:39 -05:00
quobix
7afb1e9d11 Addressed #159
Cleaned up all interesting static checks. All that is left is cosmetics.

Signed-off-by: quobix <dave@quobix.com>
2024-02-06 22:13:41 -05:00
quobix
442b048575 added missing test coverage
Signed-off-by: quobix <dave@quobix.com>
2024-01-19 19:41:15 -05:00
quobix
799f5e258a Fixed tests
Signed-off-by: quobix <dave@quobix.com>
2024-01-19 19:41:15 -05:00
quobix
906f8128ec Fixed issue with optional parameters when diffing
optional parameters being added are not breaking, this was reported in openapi-changes  https://github.com/pb33f/openapi-changes/issues/87

Signed-off-by: quobix <dave@quobix.com>
2024-01-19 19:41:15 -05:00
quobix
c8d4f72be5 Addressd issue #218
Signed-off-by: quobix <dave@quobix.com>
2024-01-18 15:11:39 -05:00
Amit Reinich
2a1e4e5b91 Modified toString function to encode a copy instead of the real (re-used) object, added schema tests for model.ChangeContext line and column on enum changes. 2024-01-11 06:28:05 -05:00
Tom Fishman
b1afe0d2c9 Change operation's tags change is breaking 2024-01-04 17:04:12 -05:00
Tristan Cartledge
e4a6c6516e chore: add more test coverage 2023-12-14 17:55:51 +00:00
Tristan Cartledge
13b97f84db chore: add more test coverage 2023-12-14 17:42:32 +00:00
Tristan Cartledge
55eb38c035 chore: add more test coverage 2023-12-14 14:56:19 +00:00
Tristan Cartledge
00e1544abd Merge branch 'main' into ordered-libopenapi 2023-12-01 17:57:05 +00:00
Tristan Cartledge
1a384fd982 fix: cleanup 2023-12-01 17:47:55 +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
quobix
8be6a66070 added benchmark to force codecov to stop being dumb.
Signed-off-by: quobix <dave@quobix.com>
2023-11-30 07:20:19 -05:00
Tristan Cartledge
785824a271 fix: fixed tests after merge 2023-11-27 17:05:37 +00:00
Tristan Cartledge
2de65e4ca0 Merge branch 'main' into Baliedge/PIP-2552-consistent-ordering 2023-11-27 12:06:39 +00:00
quobix
ac80716553 A few small bugfixes discovered from online users of openapi-changes
someone caused a panic, exposed an untested bug.

Signed-off-by: quobix <dave@quobix.com>
2023-11-17 07:08:09 -05:00
quobix
10fd6e1611 fixed merge conflicts
Signed-off-by: quobix <dave@quobix.com>
2023-11-04 11:51:59 -04:00
quobix
91edf28e1f Merge branch 'main' of https://github.com/pb33f/libopenapi into v0.13.0
Signed-off-by: quobix <dave@quobix.com>

# Conflicts:
#	what-changed/model/info_test.go
2023-11-04 11:44:00 -04:00
Sebastian Kunz
76dc865821 fix: introduce extension change detection for info section
This commit provides a fix for issue #184
2023-11-04 11:33:24 -04:00
quobix
ddb761c1a9 fixed issue with what-changed and path detection #186
Signed-off-by: quobix <dave@quobix.com>
2023-11-02 16:32:57 -04:00
quobix
c1cf240cab Working through test coverage
This will be a bit of a slog, new code built in the hot path will need some love and attention.

Signed-off-by: quobix <dave@quobix.com>
2023-10-24 16:13:08 -04:00
quobix
5d717bdefe Changed document signatures to use error instead of []error
Also removed old swagger `CreateDocument` method that has been deprecated.

Signed-off-by: quobix <dave@quobix.com>
2023-10-24 12:31:47 -04:00
quobix
d30ac24db9 All tests pass! logs of tests fixed and tuning API for high level
Document configuration has been simplified, no more need for AllowRemote stuff in the document configuration, it’s assumed by setting the baseURL or the basePath.

Signed-off-by: quobix <dave@quobix.com>
2023-10-24 10:24:19 -04:00
quobix
511843e4df Major surgery on the index and resolver. A complete flip in design.
Signed-off-by: quobix <dave@quobix.com>
2023-10-14 12:36:38 -04:00
quobix
55b6e13bb5 Some housekeeping I noticed.
Signed-off-by: quobix <dave@quobix.com>
2023-10-08 12:27:52 -04:00
Tristan Cartledge
8531113e17 fix!: fixed handling of additionalProperties to handle the bool/json-schema nature better 2023-10-05 09:31:16 -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
f389fedadd Monster refactor of map to orderedmap.Map data type. 2023-09-25 08:59:42 -04:00
Shawn Poulson
652e818456 Refactor Paths to OrderedMap. 2023-09-22 17:51:21 -04:00
quobix
dab6346750 Fixed schema comparison for out of order keys. #170
Keys were being compared incorrectly due to a combination of a swapped property, that sorts differently.

Signed-off-by: quobix <dave@quobix.com>
2023-09-18 08:27:41 -04:00
Tristan Cartledge
58433a6ffc fix: add missing const value to schema 2023-09-13 06:13:09 -04:00
Quobix
4879ccc489 Cleaned up what-changed race condition issues #165
A few small async issues needed attention.

Signed-off-by: Quobix <dave@quobix.com>
2023-09-01 06:00:03 -04:00
Dmitry
2042152318 Fix the tests 2023-08-25 09:51:57 -04:00
Dave Shanley
d17ae1d610 Added more tests to ensure correct coverage.
Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-18 14:44:50 -04:00
Dave Shanley
0fbcb81015 Adding some edge cases to what-changed code
Some specs were blowing things up, some deeper logic was required.

Signed-off-by: Dave Shanley <dave@quobix.com>
2023-07-18 14:44:50 -04:00
Derrick J. Wippler
9e487a8c49 fix: mutex now convers writes to ValueReference if they happen 2023-06-30 13:08:37 -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
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
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
5189eadddc Large refactor and addedGetAllChanges to each change
tons of updates, so many things.
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
38064123ed Working through complex rendering edgecases. 2023-03-26 06:10:31 -04:00
Tristan Cartledge
9d5a5d03be fix: add missing summary for OpenAPI 3.X docs 2023-03-17 14:59:24 -04:00
Dave Shanley
f269259fcf fix: handle example comparison correctly. #61
examples can be anything, most commonly maps. previously `libopenapi` did not check maps correctly. Now it does. It was also creating a panic by inserting a nil pointer as the value to a map key. This has also been fixed.

Examples are the only element that use this pattern for comparison.
2023-01-05 17:05:36 -05:00
Hugo Stijns
1e1ec6694a Fix left right comparison 2022-12-30 10:26:57 -05:00
Hugo Stijns
b395518a5e Change indentation to tabs 2022-12-30 10:26:57 -05:00