From cbd182a74fe2f9c0b3f1b6ce0578df983dec9058 Mon Sep 17 00:00:00 2001 From: Junghyun Colin Kim Date: Tue, 30 Nov 2021 01:09:29 +0900 Subject: [PATCH] Rename sidebarName to sidebarLabel --- src/components/SideMenu/MenuItem.tsx | 6 +++--- src/services/MenuStore.ts | 2 +- src/services/models/Group.model.ts | 4 ++-- src/services/models/Operation.ts | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/SideMenu/MenuItem.tsx b/src/components/SideMenu/MenuItem.tsx index 11be6e37..955ba636 100644 --- a/src/components/SideMenu/MenuItem.tsx +++ b/src/components/SideMenu/MenuItem.tsx @@ -45,8 +45,8 @@ export class MenuItem extends React.Component { ) : ( - - {item.sidebarName} + + {item.sidebarLabel} {this.props.children} {(item.depth > 0 && item.items.length > 0 && ( @@ -96,7 +96,7 @@ export class OperationMenuItemContent extends React.Component{shortenHTTPVerb(item.httpVerb)} )} - {item.sidebarName} + {item.sidebarLabel} {this.props.children} diff --git a/src/services/MenuStore.ts b/src/services/MenuStore.ts index 770c00d5..70fb45b0 100644 --- a/src/services/MenuStore.ts +++ b/src/services/MenuStore.ts @@ -16,7 +16,7 @@ export interface IMenuItem { id: string; absoluteIdx?: number; name: string; - sidebarName: string; + sidebarLabel: string; description?: string; depth: number; active: boolean; diff --git a/src/services/models/Group.model.ts b/src/services/models/Group.model.ts index 36184963..8a9429b2 100644 --- a/src/services/models/Group.model.ts +++ b/src/services/models/Group.model.ts @@ -14,7 +14,7 @@ export class GroupModel implements IMenuItem { id: string; absoluteIdx?: number; name: string; - sidebarName: string; + sidebarLabel: string; description?: string; type: MenuItemGroupType; @@ -44,7 +44,7 @@ export class GroupModel implements IMenuItem { this.name = tagOrGroup['x-displayName'] || tagOrGroup.name; this.level = (tagOrGroup as MarkdownHeading).level || 1; - this.sidebarName = this.name; + this.sidebarLabel = this.name; // remove sections from markdown, same as in ApiInfo this.description = tagOrGroup.description || ''; diff --git a/src/services/models/Operation.ts b/src/services/models/Operation.ts index 91fda8d4..fbacc6e4 100644 --- a/src/services/models/Operation.ts +++ b/src/services/models/Operation.ts @@ -49,7 +49,7 @@ export class OperationModel implements IMenuItem { id: string; absoluteIdx?: number; name: string; - sidebarName: string; + sidebarLabel: string; description?: string; type = 'operation' as const; @@ -105,8 +105,8 @@ export class OperationModel implements IMenuItem { this.name = getOperationSummary(operationSpec); - this.sidebarName = this.name; - if (options.sideNavStyle === 'path-only') this.sidebarName = this.path; + this.sidebarLabel = this.name; + if (options.sideNavStyle === 'path-only') this.sidebarLabel = this.path; if (this.isCallback) { // NOTE: Callbacks by default should not inherit the specification's global `security` definition.