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(server): migrate snake_case query parameters rule to context object to support openapi 3 #816

Merged
merged 2 commits into from Aug 24, 2018

Conversation

maxim-tschumak
Copy link
Contributor

Related to #714

}
fun checkQueryParameter(context: Context): List<Violation> =
context.api.getAllParameters().values
.filter { "query" == it.`in` }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I like it. This reminds me about old C rules :)

/article:
get:
parameters:
- name: filterExpensiveArticles
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about checking lower letter strings with dashs and other no-alphabet charaters too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, may be this is checked somewhere else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be a part of the utility class unit tests.

@tkrop
Copy link
Member

tkrop commented Aug 24, 2018

👍

@maxim-tschumak
Copy link
Contributor Author

@tkrop please re-approve (I've merged master into the branch)

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@83737f1). Click here to learn what that means.
The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #816   +/-   ##
=========================================
  Coverage          ?   84.56%           
  Complexity        ?      916           
=========================================
  Files             ?      171           
  Lines             ?     2624           
  Branches          ?      397           
=========================================
  Hits              ?     2219           
  Misses            ?      197           
  Partials          ?      208
Impacted Files Coverage Δ Complexity Δ
.../zally/rule/zalando/SnakeCaseForQueryParamsRule.kt 83.33% <80%> (ø) 6 <5> (?)

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 83737f1...8c6cc80. Read the comment docs.

@tkrop
Copy link
Member

tkrop commented Aug 24, 2018

👍

1 similar comment
@maxim-tschumak
Copy link
Contributor Author

👍

@maxim-tschumak maxim-tschumak merged commit 2daf29c into master Aug 24, 2018
@maxim-tschumak maxim-tschumak deleted the 714-migrate-snake-case-for-queary-params branch August 24, 2018 08:33
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.

None yet

3 participants