Skip to content
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

Add Callbacks support #691

Merged

Conversation

lucasassisrosa
Copy link
Contributor

@lucasassisrosa lucasassisrosa commented Jan 8, 2024

Description

OpenAPI specs callbacks in endpoints were being ignored on rendering. I noticed the types were included but no code was found for rendering the callbacks. So callbacks included in Petstore cannot be seen at https://docusaurus-openapi.tryingpan.dev/petstore/subscribe-to-the-store-events

Motivation and Context

Be aligned with OpenAPI 3.0 Specs: https://swagger.io/docs/specification/callbacks/

How Has This Been Tested?

Go to petstore "Subscribe to the store events" - http://localhost:3000/petstore/subscribe-to-the-store-events

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@sserrata
Copy link
Member

sserrata commented Jan 8, 2024

Hi @lucasassisrosa, thanks for the contribution. Can you address the linter/unused import error? Thanks!

Copy link

github-actions bot commented Jan 9, 2024

Visit the preview URL for this PR (updated for commit 980324d):

https://docusaurus-openapi-36b86--pr691-y9v5jecd.web.app

(expires Thu, 08 Feb 2024 16:11:31 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

.vscode/settings.json Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
Copy link
Member

@sserrata sserrata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lucasassisrosa, everything looks solid so far! Please see my comments/questions.

Copy link
Member

@sserrata sserrata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sserrata sserrata merged commit 1d067a5 into PaloAltoNetworks:main Jan 9, 2024
13 checks passed
lucasassisrosa added a commit to lucasassisrosa/docusaurus-openapi-docs that referenced this pull request Jan 18, 2024
* add support to callbacks in openapi specs

* set package manager in package json

* implement operations as tabs within request panel

* render callbacks below Request and Responses

* remove unwanted files

* rename create file

* restore json settings
sserrata pushed a commit that referenced this pull request Jan 18, 2024
* Add Callbacks support (#691)

* add support to callbacks in openapi specs

* set package manager in package json

* implement operations as tabs within request panel

* render callbacks below Request and Responses

* remove unwanted files

* rename create file

* restore json settings

* convert OperationTabs to typescript

* fix linter

* fix warning on lint order
@lucasassisrosa lucasassisrosa deleted the DOTCOM-2899-support-callbacks branch February 1, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants