From 9e7ba0ea8d5aab9a1224ca2bfa216d51abba1f5e Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Mon, 31 Oct 2016 12:32:03 +0200 Subject: [PATCH] Deprecate x-traitTag --- docs/redoc-vendor-extensions.md | 2 +- lib/utils/spec-manager.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/redoc-vendor-extensions.md b/docs/redoc-vendor-extensions.md index e12ef1e5..6cda3908 100644 --- a/docs/redoc-vendor-extensions.md +++ b/docs/redoc-vendor-extensions.md @@ -49,7 +49,7 @@ info: ### Tag Object vendor extensions Extends OpenAPI [Tag Object](http://swagger.io/specification/#tagObject) -#### x-traitTag +#### x-traitTag [DEPRECATED] | Field Name | Type | Description | | :------------- | :------: | :---------- | | x-traitTag | boolean | In Swagger two operations can have multiply tags. This property distinguish between tags that are used to group operations (default) from tags that are used to mark operation with certain trait (`true` value) | diff --git a/lib/utils/spec-manager.ts b/lib/utils/spec-manager.ts index 0b0d5806..8027f7d8 100644 --- a/lib/utils/spec-manager.ts +++ b/lib/utils/spec-manager.ts @@ -154,6 +154,9 @@ export class SpecManager { description: tag.description, 'x-traitTag': tag['x-traitTag'] || false }; + if (tag['x-traitTag']) { + console.warn(`x-traitTag (${tag.name}) is deprecated since v1.5.0 and will be removed in the future`); + } } return tagsMap;