docs: support multiple sidebars in a project (#11768)
* changed to new sidebar across projects except resources * finalize multi sidebar support * clean up * remove redundant property * small changes * fixes * generate * fix error * fix initial open
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import type { SidebarItem } from "types"
|
||||
import type { Operation, PathsObject } from "@/types/openapi"
|
||||
import type { OpenAPIV3 } from "openapi-types"
|
||||
import dynamic from "next/dynamic"
|
||||
import type { MethodLabelProps } from "@/components/MethodLabel"
|
||||
import getSectionId from "./get-section-id"
|
||||
import { Sidebar } from "types"
|
||||
|
||||
const MethodLabel = dynamic<MethodLabelProps>(
|
||||
async () => import("../components/MethodLabel")
|
||||
@@ -11,8 +11,8 @@ const MethodLabel = dynamic<MethodLabelProps>(
|
||||
|
||||
export default function getTagChildSidebarItems(
|
||||
paths: PathsObject
|
||||
): SidebarItem[] {
|
||||
const items: SidebarItem[] = []
|
||||
): Sidebar.SidebarItem[] {
|
||||
const items: Sidebar.SidebarItem[] = []
|
||||
Object.entries(paths).forEach(([, operations]) => {
|
||||
Object.entries(operations).map(([method, operation]) => {
|
||||
const definedOperation = operation as Operation
|
||||
|
||||
Reference in New Issue
Block a user