-
Notifications
You must be signed in to change notification settings - Fork 467
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
Middleware that adds hash of apidoc into response headers #215
Conversation
@@ -266,6 +268,18 @@ def reload_documentation | |||
end | |||
end | |||
|
|||
def documentation_tag |
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.
what about digest
or checksum
instead of tag
? I had little problem understanding the code with this naming
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.
Yes I like checksum
more, I'll rename it.
I'd like to trigger tag_documentation also in development mode when the API source was changed and reloaded. Is there good place in the code where to put this? Make it optional in apipie config perhaps? |
Where is the middleware registered? If it needs manual registration, it should be noted in the documentation. The documentation should be update anyway to cover this possiblity |
@mbacovsky probably here would be the right place for the recallcuation: https://github.com/Apipie/apipie-rails/blob/master/lib/apipie/application.rb#L259 |
The middleware needs manual registration as noted in comments in code. I can move this to the docs as well. |
If the middleware needs to be rigestered manually, it probably doesn't make sense to have the |
The patch was updated. I'll add some info in documentation. |
Looks good so far, pending docs |
|
||
.. code:: | ||
|
||
"Apipie-Apidoc-Checksum"=>"fb81460e7f4e78d059f826624bdf9504" |
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.
What about "Apipie-Checksum" to make it a bit shorter?
Nice! |
Middleware that adds hash of apidoc into response headers
Released in 0.1.0. Thank you for your help! |
No description provided.