Skip to content
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

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

tkrop
Copy link
Member

@tkrop tkrop commented Apr 7, 2022

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.

@tkrop tkrop requested a review from zeitlinger as a code owner April 7, 2022 22:50
@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2022

Codecov Report

Merging #1382 (84b0c8c) into main (fe9b094) will not change coverage.
The diff coverage is n/a.

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe9b094...84b0c8c. Read the comment docs.

@tkrop tkrop force-pushed the 1379-upgrade-swagger-dependencies branch 3 times, most recently from fcedd14 to 9048475 Compare April 11, 2022 11:19
@tkrop tkrop force-pushed the 1379-upgrade-swagger-dependencies branch from 9048475 to 8c1babb Compare April 11, 2022 23:40
@tkrop tkrop force-pushed the 1379-upgrade-swagger-dependencies branch 2 times, most recently from 1e8e5a0 to 1e2a62e Compare April 13, 2022 16:48

Unverified

This user has not yet uploaded their public signing key.
@tkrop tkrop force-pushed the 1379-upgrade-swagger-dependencies branch from 1e2a62e to cbcb412 Compare April 14, 2022 08:17
@tkrop
Copy link
Member Author

tkrop commented Apr 14, 2022

👍

if (parsedAsSwagger !is ContentParseResult.NotApplicable) {
return parsedAsSwagger
}
return ContentParseResult.ParsedWithErrors(listOf(Violation("No valid Open API specification", EMPTY_JSON_POINTER)))
Copy link
Member Author

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.

@zeitlinger
Copy link
Contributor

👍

@tkrop tkrop merged commit 7936fac into main Apr 20, 2022
@tkrop tkrop deleted the 1379-upgrade-swagger-dependencies branch April 20, 2022 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants