api_docs: Add "GroupId" common component.

To facilitate re-use of the same parameters in other paths, this commit
store the content of the parameter "group_id" in components.
This commit is contained in:
shubhamgupta2956
2020-04-18 14:24:51 +05:30
committed by Tim Abbott
parent 8e617d7f26
commit 05b1ddeb84

View File

@@ -3279,14 +3279,7 @@ paths:
description: |
Update the user group.
parameters:
- name: group_id
in: path
description: |
The ID of the group.
schema:
type: integer
example: 42
required: true
- $ref: '#/components/parameters/GroupId'
- name: name
in: query
description: |
@@ -3324,14 +3317,7 @@ paths:
description: |
Delete the user group.
parameters:
- name: group_id
in: path
description: |
The ID of the group.
schema:
type: integer
example: 42
required: true
- $ref: '#/components/parameters/GroupId'
responses:
'200':
description: Success.
@@ -3739,3 +3725,12 @@ components:
default: []
example: ['stream', 'Denmark']
required: false
GroupId:
name: group_id
in: path
description: |
The ID of the group.
schema:
type: integer
example: 42
required: true