Update json schema
This commit is contained in:
parent
c206d8c90a
commit
58e31bed84
34
app.py
34
app.py
@ -40,7 +40,8 @@ def load_status():
|
||||
"server": "unknown",
|
||||
"sync_status": "UNKNOWN",
|
||||
"drift_count": 0,
|
||||
"files": [],
|
||||
"deployed_files": [],
|
||||
"drifted_files": [],
|
||||
"last_check": ""
|
||||
}
|
||||
except Exception as e:
|
||||
@ -89,8 +90,20 @@ def api_status():
|
||||
type: string
|
||||
drift_count:
|
||||
type: integer
|
||||
files:
|
||||
deployed_files:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
drifted_files:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
last_check:
|
||||
type: string
|
||||
post:
|
||||
@ -113,10 +126,22 @@ def api_status():
|
||||
enum: ["SYNCED", "OUT_OF_SYNC", "UNKNOWN", "PROGRESSING"]
|
||||
drift_count:
|
||||
type: integer
|
||||
files:
|
||||
deployed_files:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: [{"name": "rsyslog.conf"}]
|
||||
drifted_files:
|
||||
type: array
|
||||
items:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: []
|
||||
last_check:
|
||||
type: string
|
||||
responses:
|
||||
@ -206,7 +231,8 @@ def ready():
|
||||
"server": "unknown",
|
||||
"sync_status": "UNKNOWN",
|
||||
"drift_count": 0,
|
||||
"files": [],
|
||||
"deployed_files": [],
|
||||
"drifted_files": [],
|
||||
"last_check": ""
|
||||
}
|
||||
save_status(default_status)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user