Create separate tag for jobs in OAS (#1246)
Move paths for `/jobs**` from server tag to separate tag when generating OpenAPI document
This commit is contained in:
+10
-4
@@ -1207,7 +1207,7 @@ def get_oas_30(cfg):
|
||||
'get': {
|
||||
'summary': 'Retrieve jobs list',
|
||||
'description': 'Retrieve a list of jobs',
|
||||
'tags': ['server'],
|
||||
'tags': ['jobs'],
|
||||
'operationId': 'getJobs',
|
||||
'responses': {
|
||||
'200': {'$ref': '#/components/responses/200'},
|
||||
@@ -1221,7 +1221,7 @@ def get_oas_30(cfg):
|
||||
'get': {
|
||||
'summary': 'Retrieve job details',
|
||||
'description': 'Retrieve job details',
|
||||
'tags': ['server'],
|
||||
'tags': ['jobs'],
|
||||
'parameters': [
|
||||
name_in_path,
|
||||
{'$ref': '#/components/parameters/f'}
|
||||
@@ -1236,7 +1236,7 @@ def get_oas_30(cfg):
|
||||
'delete': {
|
||||
'summary': 'Cancel / delete job',
|
||||
'description': 'Cancel / delete job',
|
||||
'tags': ['server'],
|
||||
'tags': ['jobs'],
|
||||
'parameters': [
|
||||
name_in_path
|
||||
],
|
||||
@@ -1253,7 +1253,7 @@ def get_oas_30(cfg):
|
||||
'get': {
|
||||
'summary': 'Retrieve job results',
|
||||
'description': 'Retrive job resiults',
|
||||
'tags': ['server'],
|
||||
'tags': ['jobs'],
|
||||
'parameters': [
|
||||
name_in_path,
|
||||
{'$ref': '#/components/parameters/f'}
|
||||
@@ -1267,6 +1267,12 @@ def get_oas_30(cfg):
|
||||
}
|
||||
}
|
||||
|
||||
tag = {
|
||||
'name': 'jobs',
|
||||
'description': 'Process jobs',
|
||||
}
|
||||
oas['tags'].insert(1, tag)
|
||||
|
||||
oas['paths'] = paths
|
||||
|
||||
return oas
|
||||
|
||||
Reference in New Issue
Block a user