diff --git a/demo/swagger.yaml b/demo/swagger.yaml index 63a0bcbb..7ffec750 100644 --- a/demo/swagger.yaml +++ b/demo/swagger.yaml @@ -336,6 +336,7 @@ paths: summary: Finds Pets by tags description: 'Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.' operationId: findPetsByTags + deprecated: true produces: - application/xml - application/json diff --git a/lib/components/Operation/operation.html b/lib/components/Operation/operation.html index 4fa9a345..28a5592d 100644 --- a/lib/components/Operation/operation.html +++ b/lib/components/Operation/operation.html @@ -5,6 +5,9 @@ +
+ Warning: Deprecated +
{{tag}}
diff --git a/lib/components/Operation/operation.scss b/lib/components/Operation/operation.scss index d6cdfaf4..4c63abe2 100644 --- a/lib/components/Operation/operation.scss +++ b/lib/components/Operation/operation.scss @@ -18,6 +18,10 @@ margin-bottom: calc(1em - 6px); } +.operation-deprecated { + font-weight: bold; +} + .operation-tags { margin-top: 20px; diff --git a/lib/components/Operation/operation.ts b/lib/components/Operation/operation.ts index 0ad54e6b..dc86e7e6 100644 --- a/lib/components/Operation/operation.ts +++ b/lib/components/Operation/operation.ts @@ -7,6 +7,7 @@ import { OptionsService, MenuService } from '../../services/'; import { SwaggerBodyParameter } from '../../utils/swagger-typings'; export interface OperationInfo { + deprecated: boolean; verb: string; path: string; info: { @@ -50,6 +51,7 @@ export class Operation extends BaseComponent implements OnInit { this.operationId = this.componentSchema.operationId; this.operation = { + deprecated: this.componentSchema.deprecated, verb: JsonPointer.baseName(this.pointer), path: JsonPointer.baseName(this.pointer, 2), info: { diff --git a/lib/components/SideMenu/side-menu-items.html b/lib/components/SideMenu/side-menu-items.html index 8010e404..726900cd 100644 --- a/lib/components/SideMenu/side-menu-items.html +++ b/lib/components/SideMenu/side-menu-items.html @@ -1,6 +1,6 @@