Add Items to Sidebar
After runing the command pnpm gen-api-docs, the plugin will automatically generate a sidebar.ts file in your specified folder. This file constains the reference to all mdx files in your folder.
To show all of the new routes in sidebar menu, you need to add the new sidebar file to the sidebar.ts of the root.
In sidebars add to apiSidebar the reference to your sidebar.ts file:
textconst sidebars: SidebarsConfig = {defaultSidebar: [{ type: 'autogenerated', dirName: 'documents', }],apiSidebar: [{type: 'category',label: "User Management",link: {type: "generated-index",title: "User Management API",slug: "/category/user-management-api"},items: require("./docs/openapi/user-management/sidebar.ts")}],interfaceSidebar: [{ type: 'autogenerated', dirName: 'interfaceReference', }]};
You can add multiples sidebars.ts to the same category, this will keep all them inside the same submenu:
text{type: 'category',label: "Legacy API",link: {type: "generated-index",title: "Legacy API",slug: "/category/legacy-api"},items: [require("./docs/openapi/legacy-api/exam/sidebar.ts"),require("./docs/openapi/legacy-api/authentication/sidebar.ts"),require("./docs/openapi/legacy-api/logout/sidebar.ts")]}