Skip to content

Instantly share code, notes, and snippets.

@dio
Created December 12, 2022 04:00
Show Gist options
  • Save dio/173106d28d408483eed30b5c91dae7ff to your computer and use it in GitHub Desktop.
Save dio/173106d28d408483eed30b5c91dae7ff to your computer and use it in GitHub Desktop.
[
// TODO(dio): Include the core logic of docusaurus-plugin-openapi-docs to @extensions/plugin-service-bridge-api-docs.
// Prerequisite: you need to run `generate-service-bridge-api-docs` first.
// To generate: `yarn workspace @products/service-bridge docusaurus gen-api-docs serviceBridgeApi`
// Note: You might want to: `yarn workspace @products/service-bridge docusaurus clean-api-docs serviceBridgeApi` first.
'docusaurus-plugin-openapi-docs',
{
id: 'openapi',
docsPluginId: 'classic',
// TODO(dio): Ideally, this should consume the same "revisions" object as well.
// Or this plugin will be "merged" to @extensions/plugin-service-bridge-api-docs.
config: {
serviceBridgeApi: {
// TODO(dio): Create a helper to load this.
specPath:
'.docusaurus/plugin-service-bridge-api-docs/cache/work/openapiv2/master/1461ef177141714eeb7cf9f78cd790e543ac86ef/generated/openapiv2/openapiv3.json',
outputDir: './docs/reference/openapi/reference',
sidebarOptions: {
groupPathsBy: 'tag',
categoryLinkSource: 'tag',
},
// TODO(dio): Add versions here for 1.5.x, 1.4.x. Also we need to create "post" gen-api-docs:version to cleanup the sidebars.
},
},
},
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment