cloud-annotations / docusaurus-openapi

🦕 OpenAPI plugin for generating API reference docs in Docusaurus v2.
https://docusaurus-openapi.netlify.app
MIT License
485 stars 80 forks source link

Ability to use in an existing Docusaurus project #181

Open zia-inceptus opened 2 years ago

zia-inceptus commented 2 years ago

Hi, first of all, thanks for this awesome package, it looks really promising but I wanted to know if I can add this plugin to an already created Docusarus project rather than creating a whole new project with this tool, I wasn't able to find any relevant docs for this. Thanks.

bourdakos1 commented 2 years ago

Hey thanks :) you can install the preset “ docusaurus-preset-openapi” and update the Docusaurus config with relevant information. check out the demo folder to see a concrete example.

the readme for the preset package has more detailed info: https://github.com/cloud-annotations/docusaurus-openapi/tree/main/packages/docusaurus-preset-openapi

zia-inceptus commented 2 years ago

Thanks for the quick reply :) It seems that the preset is not compatible with Docusaurus beta.21, I'm getting the same issue as mentioned in issue https://github.com/cloud-annotations/docusaurus-openapi/issues/160

bourdakos1 commented 2 years ago

Yea, I haven’t had time to update :(

bhupendra1011 commented 1 year ago

If I try to use with classic docs plugin id , the plugin docusaurus-preset-openapi gives below error : image

bhupendra1011 commented 1 year ago

But if I try to use https://www.npmjs.com/package/docusaurus-plugin-openapi , I get below error on Docusaurus - 2.2.0 image