Fix Swagger doc issues

This commit is contained in:
Joshua Boniface 2024-08-19 16:55:13 -04:00
parent f1b4593367
commit 212ecaab68
1 changed files with 35 additions and 34 deletions

View File

@ -838,25 +838,8 @@ class API_Faults(Resource):
---
tags:
- faults
parameters:
- in: query
name: sort_key
type: string
required: false
description: The fault object key to sort results by
enum:
- first_reported
- last_reported
- acknowledged_at
- status
- health_delta
- message
responses:
200:
description: OK
schema:
type: array
items:
definitions:
- schema:
type: object
id: fault
properties:
@ -888,6 +871,26 @@ class API_Faults(Resource):
type: string
description: The textual description of the fault
example: "Node hv1 was at 40% (psur@-10%, psql@-50%) <= 50% health"
parameters:
- in: query
name: sort_key
type: string
required: false
description: The fault object key to sort results by
enum:
- first_reported
- last_reported
- acknowledged_at
- status
- health_delta
- message
responses:
200:
description: OK
schema:
type: array
items:
$ref: '#/definitions/fault'
"""
return api_helper.fault_list(sort_key=reqargs.get("sort_key", "last_reported"))
@ -948,8 +951,6 @@ class API_Faults_Element(Resource):
schema:
type: array
items:
type: object
id: fault
$ref: '#/definitions/fault'
"""
return api_helper.fault_list(limit=fault_id)
@ -1625,7 +1626,7 @@ class API_VM_Root(Resource):
descrpition: Unix timestamp of the snapshot
age:
type: string
description: Human-readable age of the snapshot in the largest viable unit: seconds, minutes, hours, days
description: Human-readable age of the snapshot in the largest viable unit (seconds, minutes, hours, days)
rbd_snapshots:
type: array
items: