diff --git a/README.md b/README.md index 3bf8cdad..a3655408 100644 --- a/README.md +++ b/README.md @@ -113,6 +113,7 @@ ReDoc makes use of the following [vendor extensions](http://swagger.io/specifica * [`x-code-samples`](docs/redoc-vendor-extensions.md#x-code-samples) - specify operation code samples * [`x-nullable`](docs/redoc-vendor-extensions.md#nullable) - mark schema param as a nullable * [`x-displayName`](docs/redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories +* [`x-tagGroups`](docs/redoc-vendor-extensions.md#x-tagGroups) - group tags by categories in the side menu ### `` tag attributes * `spec-url` - relative or absolute url to your spec file; diff --git a/docs/redoc-vendor-extensions.md b/docs/redoc-vendor-extensions.md index e68858c7..452c74d4 100644 --- a/docs/redoc-vendor-extensions.md +++ b/docs/redoc-vendor-extensions.md @@ -1,6 +1,57 @@ # ReDoc vendor extensions ReDoc makes use of the following [vendor extensions](http://swagger.io/specification/#vendorExtensions) +### Swagger Object vendor extensions +Extend OpenAPI root [Swagger Object](http://swagger.io/specification/#swaggerObject) +#### x-tagGroups + +| Field Name | Type | Description | +| :------------- | :-----------: | :---------- | +| x-tagGroups | [ [Tag Group Object](#tagGroupObject) ] | A list of tag groups | + +###### Usage in Redoc +`x-tagGroups` is used to group tags in the side menu + +#### Tag Group Object +Information about tags group +###### Fixed fields +| Field Name | Type | Description | +| :---------- | :--------: | :---------- | +| name | string | The group name | +| tags | [ string ] | List of tags to include in this group + +###### x-tagGroups example +json +```json +{ + "x-tagGroups": [ + { + "name": "User Management", + "tags": ["Users", "API keys", "Admin"] + }, + { + "name": "Statistics", + "tags": ["Main Stats", "Secondary Stats"] + } + ] +} +``` +yaml +```yaml +x-tagGroups: + - name: User Management + tags: + - Users + - API keys + - Admin + - name: Statistics + tags: + - Main Stats + - Secondary Stats +``` + +#### Logo Object + ### Info Object vendor extensions Extends OpenAPI [Info Object](http://swagger.io/specification/#infoObject) #### x-logo