-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgrade swagger dependencies (#1382) #1382
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1382 +/- ##
=======================================
Coverage 87.46% 87.46%
=======================================
Files 49 49
Lines 734 734
Branches 55 55
=======================================
Hits 642 642
Misses 63 63
Partials 29 29 Continue to review full report at Codecov.
|
fcedd14
to
9048475
Compare
server/zally-core/src/test/kotlin/org/zalando/zally/core/DefaultContextFactoryTest.kt
Outdated
Show resolved
Hide resolved
...zally-ruleset-zally/src/test/kotlin/org/zalando/zally/ruleset/zally/PathParameterRuleTest.kt
Outdated
Show resolved
Hide resolved
9048475
to
8c1babb
Compare
server/zally-core/src/test/kotlin/org/zalando/zally/core/DefaultContextFactoryTest.kt
Outdated
Show resolved
Hide resolved
server/zally-core/src/main/kotlin/org/zalando/zally/core/ast/ReverseAstBuilder.kt
Show resolved
Hide resolved
1e8e5a0
to
1e2a62e
Compare
1e2a62e
to
cbcb412
Compare
👍 |
if (parsedAsSwagger !is ContentParseResult.NotApplicable) { | ||
return parsedAsSwagger | ||
} | ||
return ContentParseResult.ParsedWithErrors(listOf(Violation("No valid Open API specification", EMPTY_JSON_POINTER))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how the violation is triggered on the failed parsing.
👍 |
fixes #1343.
contributes #1230.
Upgrade swagger dependencies to enable support for Open API 3.1. As it turned out while testing #1343 while migrating to JUnit 5 was actually disabling all tests through the missing dependency to the runtime. So we had to fix this first.
I also added a small fix of the Zally API actually defining Bearer Authentication.
Unfortunately, updating to the latest library is not sufficient for OpenAPI 3.1. Adding smoke test for Open API 3.1 support showed, that support for OpenAPI 3.1 in the latest swagger-parser version is still missing. Only swagger-core is ready for OpenAPI 3.1.
I finally added an improved failure handling on unsupported OpenAPI versions and unparsable files: They consistently now violate rule #101 of the guideline.