[specific ci=Group23-VIC-Machine-Service] Format VCH creation log API response to text/plain#6640
Merged
AngieCris merged 1 commit intovmware:feature/vic-machine-servicefrom Nov 8, 2017
Conversation
andrewtchin
approved these changes
Oct 26, 2017
2faf0a5 to
c98e4aa
Compare
Member
|
I think this produces the right behavior (i.e., that the handler produces plain text responses), but I don't think this is the best implementation. Currently, the It seems like we should:
I also wonder if we can expand the existing tests in the |
c98e4aa to
e2957ac
Compare
e2957ac to
66411cf
Compare
8a225e3 to
bad4f65
Compare
jzt
approved these changes
Nov 1, 2017
bad4f65 to
5f5faa4
Compare
zjs
reviewed
Nov 6, 2017
lib/apiservers/service/swagger.json
Outdated
| "responses": { | ||
| "200": { "$ref": "#/responses/vch-log" }, | ||
| "default": { "$ref": "#/responses/error" } | ||
| "default": { "description":"Error when getting VCH logs", "schema": {"type": "string" } } |
Member
There was a problem hiding this comment.
I think it might make sense to define a response for this (e.g., #/responses/error-plain) to avoid duplication between the two handlers.
Contributor
Author
There was a problem hiding this comment.
Thanks, just added the change
zjs
approved these changes
Nov 6, 2017
dfd6a3a to
eb07b69
Compare
8bdf2b4 to
bb71564
Compare
2d7026a to
99035e4
Compare
bb71564 to
3e86c03
Compare
1 task
zjs
pushed a commit
that referenced
this pull request
Nov 15, 2017
error output is formatted to string as well.
zjs
pushed a commit
that referenced
this pull request
Nov 16, 2017
error output is formatted to string as well.
zjs
pushed a commit
that referenced
this pull request
Nov 20, 2017
error output is formatted to string as well.
AngieCris
added a commit
to AngieCris/vic
that referenced
this pull request
Nov 20, 2017
error output is formatted to string as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6598
The VCH creation handler log output
text/plainformat (log messages upon 200 response code, and error string in all other HTTP error codes).A snippet of how the handler response looks like upon 200:
Upon HTTP error codes:
Integration tests are added to verify output containing log messages is multi-line, and error response is of string type.