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(server): migrate pascal case http headers rule to context object to support openapi 3 #820
Conversation
Codecov Report
@@ Coverage Diff @@
## master #820 +/- ##
===========================================
+ Coverage 84.86% 85.1% +0.24%
+ Complexity 907 902 -5
===========================================
Files 171 171
Lines 2557 2558 +1
Branches 393 395 +2
===========================================
+ Hits 2170 2177 +7
+ Misses 151 149 -2
+ Partials 236 232 -4
Continue to review full report at Codecov.
|
val swagger = swaggerWithHeaderParams("Right-Name") | ||
assertThat(rule.validate(swagger)).isNull() | ||
} | ||
fun `checkHttpHeaders should return violation if not pascal case is used`() { |
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 one negative check is definitely not enough as long as we do not have tests for de.zalando.zally.util.OpenApiUtil.kt
. We need to add a check for each potential header location, to make sure that we do not miss one. Anyhow, I would prefer similar unit tests on de.zalando.zally.util.OpenApiUtil.kt
.
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.
Agree, we should unit test OpenApiUtil
class. I'll implement the tests.
7b58681
to
3073b8f
Compare
👍 |
5f4b356
to
552cc17
Compare
@tkrop please re-review, the improvements have been implemented |
👍 |
1 similar comment
👍 |
Related to #714