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

[WIP] Add swagger config #242

Closed
wants to merge 4 commits into from
Closed

Conversation

vickyhella
Copy link
Contributor

@vickyhella vickyhella commented Nov 9, 2022

This PR:

  • Adds the openapi plugin 2.0.0-beta.3.
  • Bumps docusaurus to 2.4.1
  • Bumps react to 18.2.0
  • Adds swagger API config to the docusaurus.config.js file
  • Generates API mdx files

The mdx files in the docs/api folder were generated by running the yarn docusaurus gen-api-docs all command.

Compatibility:
Docusaurus 2.3.1 works well with openapi 2.0.0-beta.1.
Docusaurus 2.2.0 works well with openapi 1.4.2.
Docusaurus 2.4.1 doesn't work with openapi 2.0.0-beta.2 or 2.0.0-beta.3.
Update: after upgrading react to the latest 18.2.0, docusaurus and openapi can be bumped to the latest 2.4.1 and 2.0.0-beta.3.

Related issue:

What needs to be done:

  • Modify api/petstore.yaml and docusaurus.config.js based on our actual needs (see the plugin documentation for more info). Note that the current api/petstore.yaml file is an example file for reference only.

  • Run yarn docusaurus gen-api-docs all, which generates MDX files in the docs/api folder.

  • It'll be better if we can split the yaml file into several files by category, because the plugin actually generates one page for each API, which might be hard to read as we have hundreds of APIs.

    image

References

@netlify
Copy link

netlify bot commented Nov 9, 2022

Deploy Preview for harvester-preview ready!

Name Link
🔨 Latest commit 967fd41
🔍 Latest deploy log https://app.netlify.com/sites/harvester-preview/deploys/64daf17b853a3a18bb7522d5
😎 Deploy Preview https://64daf17b853a3a18bb7522d5--harvester-preview.netlify.app

@vickyhella
Copy link
Contributor Author

@guangbochen Already updated the API titles and adjusted the sidebar. Please help take a look at the production build as mentioned before. Thanks!

@vickyhella
Copy link
Contributor Author

Closing in favor of #388

@vickyhella vickyhella closed this Aug 15, 2023
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