-
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
feat: add callbacks support #1224
Merged
RomanHotsiy
merged 37 commits into
Redocly:master
from
lesyk-lesyk:feat/callbacks-support
Apr 8, 2020
Merged
feat: add callbacks support #1224
RomanHotsiy
merged 37 commits into
Redocly:master
from
lesyk-lesyk:feat/callbacks-support
Apr 8, 2020
Conversation
This file contains 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
Add one more dropdown
Create GenericDropdown
Refactor params
Change codeSample to codeBlock
RomanHotsiy
requested changes
Apr 7, 2020
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.
RomanHotsiy
approved these changes
Apr 8, 2020
RomanHotsiy
changed the title
[Feature] Add Callbacks support
feat: add callbacks support
Apr 8, 2020
🎉 Thanks @Jonathan-Bailey-Bose and @Makashov for initial implementation! Kudos to @okachynskyy for finishing it up 👏 🔥! I will publish a new release at the end of the week. |
Released in |
This was referenced Apr 27, 2020
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.
This PR utilizes the code from #1102 written by @Jonathan-Bailey-Bose and #757 written by @Makashov to add callback support to ReDoc.
Updated layout for Callbacks middle section:
POST / PUT / etc.
) for callback summaryDeprecated
label for deprecated callbacks (with strikeout callback summary)Created new component for visualizing Callback details
Endpoint
component from the right panel to Callback details (addedcompact
property for Endpoint component for displaying smaller HTTP method verb)By default, the callbacks do not use top-level Servers
But servers can be defined
Added one more dropdown for switching callback request examples (with truncating long names with an ellipsis). Created a "GenericChildrenSwitcher" component that tracks the selected item itself.
Added new endpoint
/store/subscribe
and few callbacks inopenapi.yaml
demo file with different configs to illustrate all possible configurations for callbacks.Also, in the scope of this PR was updated styles for the label in the dropdown for consistency and added gray colors to the theme.
All together: