-
Notifications
You must be signed in to change notification settings - Fork 126
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
Fixes #115
Fixes #115
Conversation
@@ -80,14 +80,19 @@ def rendered_markdown(string) | |||
end | |||
|
|||
def formatted_body(body, type) | |||
return body if body == " " | |||
return body if body == "[binary data]" # see https://github.com/zipmark/rspec_api_documentation/blob/560c3bdc7bd5581e7c223334390221ecfc910be8/lib/rspec_api_documentation/client_base.rb#L88-L96 |
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.
refactor and 🐞 fix
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.
the "[binary data"]
change was related in our app to changing from - rack (2.0.8) to rack (2.1.1)
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.
raise JSON::ParserError | ||
rescue => e | ||
if Apitome.configuration.formatted_body_error_handler | ||
Apitome.configuration.formatted_body_error_handler.call(e, body, type) |
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.
✨
<% | ||
rescue => e | ||
if Apitome.configuration.example_error_handler | ||
Apitome.configuration.example_error_handler.call(e, "request", request) |
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.
✨
<% | ||
rescue => e | ||
if Apitome.configuration.example_error_handler | ||
Apitome.configuration.example_error_handler.call(e, "response", request) |
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.
✨
@@ -0,0 +1,3 @@ | |||
//= link apitome/application.css | |||
//= link apitome/application.js | |||
//= link apitome/highlight_themes/default.css |
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.
🐞 fix
Do not display binary data in generated documentation. Closes #199.
no tests at this time.. just review for the shape of it, breaking it up, whatever
Fixes