eclipse / kapua

Eclipse Public License 2.0
222 stars 160 forks source link

:bug: [REST API] MetricType unmarshalling in APIs #4063

Closed Agnul97 closed 2 months ago

Agnul97 commented 2 months ago

Brief description of the PR. Some rest api methods accept query parameters of types MetricType, however a log at container startup warns that jersey does not know how to unmarshal them. I wanted to resolve this warning

Description of the solution adopted I simply decided to change the MetricType QueryParam into a simple String, that is then parsed inside the method into the actual MetricType. In this way jersey doesn't complain

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 16.81%. Comparing base (c2f4542) to head (f88875d). Report is 5 commits behind head on develop.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse/kapua/pull/4063/graphs/tree.svg?width=650&height=150&src=pr&token=1P4N4CApH8&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse)](https://app.codecov.io/gh/eclipse/kapua/pull/4063?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) ```diff @@ Coverage Diff @@ ## develop #4063 +/- ## ============================================= - Coverage 16.81% 16.81% -0.01% Complexity 22 22 ============================================= Files 2008 2008 Lines 52158 52160 +2 Branches 4395 4395 ============================================= Hits 8770 8770 - Misses 42992 42994 +2 Partials 396 396 ``` | [Files](https://app.codecov.io/gh/eclipse/kapua/pull/4063?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse) | Coverage Δ | | |---|---|---| | [...a/app/api/resources/v1/resources/DataMessages.java](https://app.codecov.io/gh/eclipse/kapua/pull/4063?src=pr&el=tree&filepath=rest-api%2Fresources%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fapp%2Fapi%2Fresources%2Fv1%2Fresources%2FDataMessages.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-cmVzdC1hcGkvcmVzb3VyY2VzL3NyYy9tYWluL2phdmEvb3JnL2VjbGlwc2Uva2FwdWEvYXBwL2FwaS9yZXNvdXJjZXMvdjEvcmVzb3VyY2VzL0RhdGFNZXNzYWdlcy5qYXZh) | `0.00% <0.00%> (ø)` | | | [...p/api/resources/v1/resources/DataMessagesJson.java](https://app.codecov.io/gh/eclipse/kapua/pull/4063?src=pr&el=tree&filepath=rest-api%2Fresources%2Fsrc%2Fmain%2Fjava%2Forg%2Feclipse%2Fkapua%2Fapp%2Fapi%2Fresources%2Fv1%2Fresources%2FDataMessagesJson.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse#diff-cmVzdC1hcGkvcmVzb3VyY2VzL3NyYy9tYWluL2phdmEvb3JnL2VjbGlwc2Uva2FwdWEvYXBwL2FwaS9yZXNvdXJjZXMvdjEvcmVzb3VyY2VzL0RhdGFNZXNzYWdlc0pzb24uamF2YQ==) | `0.00% <0.00%> (ø)` | |