-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[FEATURE] Add callback support #1102
[FEATURE] Add callback support #1102
Conversation
I gave this a shot and it worked flawlessly with our API spec. Thank you! It did add some extra debug logging to the output which I imagine should be removed before merging. |
@sundbry Glad to hear it! Thanks for the catch, forgot to remove that pesky line 😉 |
74a339f
to
ff25124
Compare
Hey @Jonathan-Bailey-Bose! Thanks for your PR, we're super busy right now. I hope I will be able to review and merge this PR early Feb |
60fa093
to
fba43a1
Compare
Do we know if this can be merged soon!? We are using many resthooks/webhooks in our product and it would be nice to be able to document them properly with redoc! |
It would be great to have this feature in production. |
Excited to see this merged as well. Looks great so far. I did find a couple small bugs... 1. Servers
2. Scrolling menuSomething about adding the callback section makes the menu disappear/jump to the top during scrolling. It appears to happen as you scroll into (or out of) a It also renders the menu inert. For me, it only happens on Chromium 80 and not on FireFox 73. |
I think the Chrome 80 issue has been already fixed in the latest RC release! |
See #1167, I don't believe this branch has been rebased on top of that fix yet, but the fix exists in v2.0.0-rc.23 |
6dabc4b
to
b001efa
Compare
Branch has been rebased ontop of latest changes, including the Chrome 80 fix. |
@RomanHotsiy Any idea of when this will be reviewed and merged? |
It would be really great to have this PR merged |
I hope the reviews for this PR is in progress. It would be great to have an RC build with this feature! @RomanHotsiy @Jonathan-Bailey-Bose |
Sorry for the huge delay. We're super busy. Thanks for your contribution again! I found some time today to review the functionality of this PR 🎉 I have a few points: You use
Are you willing to apply the changes? I can't ask you as you already put so much efforts into this and hit the huge delays from our side 😞. I can pick it up too. Thanks |
Superseded by #1224 |
Description
This PR utilizes the code from #757 written by @Makashov to add callback support to ReDoc. It further adds to the code by adding the following:
isCallback: boolean
field to theOperationModel
class in order to distinguish a normalOperation
from aCallback
. This defaults tofalse
.Callback
s are defined with the following behavior as a type ofOperation
:Callback
s by default will use theevent name
for the view's label when rendered by ReDoc, as opposed to theoperationID
.Callback
s by default do not inherit the specification's globalsecurity
definition(s). They default to having no security, and can have security added on an individual basis.Callback
s by default do inherit the specification's globalservers
definition(s). In many cases, this can be undesirable. Override theservers
property on individual callbacks to remedy this if needed.