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

Add query-params Validation #2043

Merged
merged 1 commit into from
Oct 8, 2024
Merged

Add query-params Validation #2043

merged 1 commit into from
Oct 8, 2024

Conversation

allentiak
Copy link
Member

No description provided.

modules/operation-measure-evaluate-measure/Makefile Outdated Show resolved Hide resolved
modules/operation-measure-evaluate-measure/deps.edn Outdated Show resolved Hide resolved
modules/operation-measure-evaluate-measure/deps.edn Outdated Show resolved Hide resolved
modules/operation-measure-evaluate-measure/deps.edn Outdated Show resolved Hide resolved
modules/operation-measure-evaluate-measure/tests.edn Outdated Show resolved Hide resolved
@allentiak allentiak force-pushed the date-validation branch 3 times, most recently from 48d71c5 to e73caa3 Compare October 1, 2024 21:18
@allentiak allentiak force-pushed the date-validation branch 3 times, most recently from c50e9f2 to 8bdb368 Compare October 7, 2024 18:08
@allentiak allentiak marked this pull request as ready for review October 7, 2024 18:20
Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.99%. Comparing base (d5f3b43) to head (391091c).
Report is 14 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2043   +/-   ##
=======================================
  Coverage   94.98%   94.99%           
=======================================
  Files         330      330           
  Lines       20136    20155   +19     
  Branches      483      482    -1     
=======================================
+ Hits        19126    19146   +20     
  Misses        527      527           
+ Partials      483      482    -1     

see 4 files with indirect coverage changes

Before this change, the `query-params` value was coerced,
but never validated (which was a bug).

* `get-param-value`
 - add parameter: `validator` (optional)
 - refactor
 - document

* implement and use validators:
- `validate-date`
- `validate-string`
- `validate-noop`

* implement and use coercer:
- `coercer-noop`

*rename `coerce-report-type` to
 `coerce-and-validate-report-type`.

* implement and use anomalies:
- create `invalid-string-param-anom`
- create `invalid-date-param-anom`

* create `invalid-string-param-msg`
 (`invalid-date-param-msg` already existed)

* add regression test

Misc:
* document `handler`
* add regression test
* reformat with `cljfmt`
@allentiak allentiak changed the title Date validation Date Validation Oct 7, 2024
@allentiak allentiak changed the title Date Validation query-params Validation Oct 7, 2024
@allentiak allentiak changed the title query-params Validation Add query-params Validation Oct 7, 2024
@alexanderkiel alexanderkiel added this to the v0.31.0 milestone Oct 8, 2024
@alexanderkiel alexanderkiel added this pull request to the merge queue Oct 8, 2024
Merged via the queue into main with commit 788940f Oct 8, 2024
132 checks passed
@alexanderkiel alexanderkiel deleted the date-validation branch October 8, 2024 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants