docs: use new x-sidebar-summary for sidebar items in api-reference if available (#8865)
Use the new `x-sidebar-summary` OAS attribute when adding operations to the sidebar, if available.
This commit is contained in:
@@ -19,6 +19,7 @@ export type Operation = OpenAPIV3.OperationObject<{
|
|||||||
parameters: Parameter[]
|
parameters: Parameter[]
|
||||||
"x-featureFlag"?: string
|
"x-featureFlag"?: string
|
||||||
"x-workflow"?: string
|
"x-workflow"?: string
|
||||||
|
"x-sidebar-summary"?: string
|
||||||
}>
|
}>
|
||||||
|
|
||||||
export type RequestObject = OpenAPIV3.RequestBodyObject & {
|
export type RequestObject = OpenAPIV3.RequestBodyObject & {
|
||||||
|
|||||||
@@ -23,7 +23,10 @@ export default function getTagChildSidebarItems(
|
|||||||
...(definedOperation.tags || []),
|
...(definedOperation.tags || []),
|
||||||
definedOperation.operationId,
|
definedOperation.operationId,
|
||||||
]),
|
]),
|
||||||
title: definedOperation.summary || definedOperation.operationId,
|
title:
|
||||||
|
definedOperation["x-sidebar-summary"] ||
|
||||||
|
definedOperation.summary ||
|
||||||
|
definedOperation.operationId,
|
||||||
additionalElms: (
|
additionalElms: (
|
||||||
<MethodLabel method={definedMethod} className="h-fit" />
|
<MethodLabel method={definedMethod} className="h-fit" />
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user