Skip to content

Don't require fields on the evalResult response object#238

Closed
erithmetic wants to merge 2 commits into
openflagr:masterfrom
erithmetic:eval-result-remove-required-fields
Closed

Don't require fields on the evalResult response object#238
erithmetic wants to merge 2 commits into
openflagr:masterfrom
erithmetic:eval-result-remove-required-fields

Conversation

@erithmetic
Copy link
Copy Markdown

@erithmetic erithmetic commented Mar 19, 2019

This caused an issue under the following circumstance:

  • A flag did not exist in flagr
  • The consumer requested a flag by only specifying :flag_key
  • Flagr returned a 200 response with :flag_id omitted
  • The ruby code generated by swagger raised an ArgumentError because the response from the server was missing :flag_id

Ultimately, it's up to the consumer app anyway to decide what it requires from the server response, not the HTTP interface library.

Ultimately, it's up to the consumer app to decide what it requires from the server response. 

This caused an issue under the following circumstance:
* A flag did not exist in flagr
* The consumer requested a flag by only specifying `:flag_key`
* Flagr returned a 200 response with `:flag_id` omitted
* The ruby code generated by swagger raised an `ArgumentError` because the response from the server was missing `:flag_id`
@erithmetic erithmetic requested a review from zhouzhuojie March 19, 2019 18:15
@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #238 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #238   +/-   ##
=======================================
  Coverage   83.69%   83.69%           
=======================================
  Files          25       25           
  Lines        1441     1441           
=======================================
  Hits         1206     1206           
  Misses        177      177           
  Partials       58       58

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 82dcc45...2969e52. Read the comment docs.

@zhouzhuojie
Copy link
Copy Markdown
Collaborator

It requires changes more than just swagger yaml changes. Can you make gen and then help fix all the compilation error related to the changes?

@zhouzhuojie
Copy link
Copy Markdown
Collaborator

It may be tricky to fix some tests, thus I created a new PR here #239

@erithmetic erithmetic closed this Mar 19, 2019
@erithmetic erithmetic deleted the eval-result-remove-required-fields branch December 2, 2019 14:23
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.

3 participants