simplify/factorize backend for maintenance

This commit is contained in:
Maximilien Carbonne
2024-09-22 19:12:06 +02:00
parent 17ecfa2c66
commit ca85d4b483
10 changed files with 103 additions and 172 deletions

View File

@@ -913,11 +913,31 @@
"Item Maintenance"
],
"summary": "Get Maintenance Log",
"parameters": [
{
"enum": [
"scheduled",
"completed",
"both"
],
"type": "string",
"x-enum-varnames": [
"MaintenanceFilterStatusScheduled",
"MaintenanceFilterStatusCompleted",
"MaintenanceFilterStatusBoth"
],
"name": "status",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/repo.MaintenanceLog"
"type": "array",
"items": {
"$ref": "#/definitions/repo.MaintenanceEntryWithDetails"
}
}
}
}
@@ -2694,26 +2714,6 @@
"MaintenanceFilterStatusBoth"
]
},
"repo.MaintenanceLog": {
"type": "object",
"properties": {
"costAverage": {
"type": "number"
},
"costTotal": {
"type": "number"
},
"entries": {
"type": "array",
"items": {
"$ref": "#/definitions/repo.MaintenanceEntry"
}
},
"itemId": {
"type": "string"
}
}
},
"repo.NotifierCreate": {
"type": "object",
"required": [