Skip to content

Commit 0571af7

Browse files
authored
Merge pull request #4288 from lornajane/improved-tags
Additional fields for the tag object
2 parents fd34321 + 581391a commit 0571af7

File tree

1 file changed

+42
-7
lines changed

1 file changed

+42
-7
lines changed

Diff for: src/oas.md

+42-7
Original file line numberDiff line numberDiff line change
@@ -2691,24 +2691,59 @@ It is not mandatory to have a Tag Object per tag defined in the Operation Object
26912691

26922692
| Field Name | Type | Description |
26932693
| ---- | :----: | ---- |
2694-
| <a name="tag-name"></a>name | `string` | **REQUIRED**. The name of the tag. |
2694+
| <a name="tag-name"></a>name | `string` | **REQUIRED**. The name of the tag. Use this value in the `tags` array of an Operation. |
2695+
| <a name="tag-summary"></a>summary | `string` | A short summary of the tag, used for display purposes. |
26952696
| <a name="tag-description"></a>description | `string` | A description for the tag. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
26962697
| <a name="tag-external-docs"></a>externalDocs | [External Documentation Object](#external-documentation-object) | Additional external documentation for this tag. |
2698+
| <a name="tag-parent"></a>parent | `string` | The `name` of a tag that this tag is nested under. The named tag MUST exist in the API description, and circular references between parent and child tags MUST NOT be used. |
2699+
| <a name="tag-kind"></a>kind | `string` | A machine-readable string to categorize what sort of tag it is. Any string value can be used; common uses are `nav` for Navigation, `badge` for visible badges, `audience` for APIs used by different groups. A [registry of the most commonly used values](https://spec.openapis.org/registry/tag-kind/) is available. |
26972700

26982701
This object MAY be extended with [Specification Extensions](#specification-extensions).
26992702

27002703
##### Tag Object Example
27012704

27022705
```json
2703-
{
2704-
"name": "pet",
2705-
"description": "Pets operations"
2706-
}
2706+
"tags": [
2707+
{
2708+
"name": "account-updates",
2709+
"summary": "Account Updates",
2710+
"description": "Account update operations",
2711+
"kind": "nav"
2712+
},
2713+
{
2714+
"name": "partner",
2715+
"summary": "Partner",
2716+
"description": "Operations available to the partners network",
2717+
"parent": "external",
2718+
"kind": "audience"
2719+
},
2720+
{
2721+
"name": "external",
2722+
"summary": "External",
2723+
"description": "Operations available to external consumers",
2724+
"kind": "audience"
2725+
}
2726+
]
27072727
```
27082728

27092729
```yaml
2710-
name: pet
2711-
description: Pets operations
2730+
tags:
2731+
2732+
- name: account-updates
2733+
summary: Account Updates
2734+
description: Account update operations
2735+
kind: nav
2736+
2737+
- name: partner
2738+
summary: Partner
2739+
description: Operations available to the partners network
2740+
parent: external
2741+
kind: audience
2742+
2743+
- name: external
2744+
summary: External
2745+
description: Operations available to external consumers
2746+
kind: audience
27122747
```
27132748

27142749
#### Reference Object

0 commit comments

Comments
 (0)