mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 01:54:08 +03:00
add x-tagGroups docs
This commit is contained in:
parent
779a3a2db2
commit
f902abd5f1
|
@ -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
|
||||
|
||||
### `<redoc>` tag attributes
|
||||
* `spec-url` - relative or absolute url to your spec file;
|
||||
|
|
|
@ -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
|
||||
|
||||
#### <a name="tagGroupObject"></a>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
|
||||
```
|
||||
|
||||
#### <a name="logoObject"></a>Logo Object
|
||||
|
||||
### Info Object vendor extensions
|
||||
Extends OpenAPI [Info Object](http://swagger.io/specification/#infoObject)
|
||||
#### x-logo
|
||||
|
|
Loading…
Reference in New Issue
Block a user