Remove required fields from evalResult swagger model#239
Conversation
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
==========================================
- Coverage 83.69% 82.62% -1.07%
==========================================
Files 25 25
Lines 1441 1439 -2
==========================================
- Hits 1206 1189 -17
- Misses 177 192 +15
Partials 58 58
Continue to review full report at Codecov.
|
| } | ||
| }) | ||
| } | ||
|
|
There was a problem hiding this comment.
Since go 1.12, monkey.PatchInstanceMethod is not working anymore, thus remove this hacky monkey patch
|
Tested the change with |
erithmetic
left a comment
There was a problem hiding this comment.
This looks good, we verified that if only flag_key is requested and the flag does not exist, flagr will respond with flag_id removed from the response as the serializer automatically removes items with default values.
Description
This caused an issue under the following circumstance:
:flag_key:flag_idomittedArgumentErrorbecause the response from the server was missing:flag_idUltimately, it's up to the consumer app anyway to decide what it requires from the server response, not the HTTP interface library.
Motivation and Context
How Has This Been Tested?
Unit test and integration tests
Types of changes
Checklist: