-
Notifications
You must be signed in to change notification settings - Fork 783
Info Select & Rendering responses JSON #144
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
Conversation
awsshell/utils.py
Outdated
| return obj | ||
|
|
||
|
|
||
| def formatted_json(response): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function names should be actions, so format_json
06a152c to
f698af3
Compare
| return obj | ||
|
|
||
|
|
||
| def format_json(response): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple though this one-line function is, it should still have a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was being implicitly tested through one of the Environment's unit tests, but I agree an explicit test for this too makes sense.
|
Other than that one test, |
be62166 to
b83831a
Compare
|
Implements an Info Select interaction that will show the full JSON body of whatever option you're currently selecting in a similar fashion to the docs pane. I held off on adding this because I was unsure about how to safely render the responses as JSON because the
json.dumpmethod couldn't handledatetimeobjects. It seems the CLI also had this issue and implemented ajson_encoderutil method to handle it. I've refactored the wizards to use this in all places where something is being rendered as JSON.@JordonPhillips @kyleknap @jamesls