From 58c92668f39f957831fe53aa85951d529a4de038 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sun, 22 Oct 2023 13:28:39 +0200 Subject: [PATCH] fix(provisioning_api): Fix quota fields in OpenAPI Signed-off-by: jld3103 --- .../lib/ResponseDefinitions.php | 6 ++-- apps/provisioning_api/openapi.json | 36 +++++++++++++++---- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/apps/provisioning_api/lib/ResponseDefinitions.php b/apps/provisioning_api/lib/ResponseDefinitions.php index edb9138659ada..7f26384038554 100644 --- a/apps/provisioning_api/lib/ResponseDefinitions.php +++ b/apps/provisioning_api/lib/ResponseDefinitions.php @@ -27,11 +27,11 @@ /** * @psalm-type ProvisioningApiUserDetailsQuota = array{ - * free?: float, + * free?: float|int, * quota?: float|int|string, * relative?: float, - * total?: float, - * used?: float, + * total?: float|int, + * used?: float|int, * } * * @psalm-type ProvisioningApiUserDetails = array{ diff --git a/apps/provisioning_api/openapi.json b/apps/provisioning_api/openapi.json index 566e907bac138..5a0cf72575751 100644 --- a/apps/provisioning_api/openapi.json +++ b/apps/provisioning_api/openapi.json @@ -507,8 +507,16 @@ "type": "object", "properties": { "free": { - "type": "number", - "format": "float" + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + } + ] }, "quota": { "oneOf": [ @@ -530,12 +538,28 @@ "format": "float" }, "total": { - "type": "number", - "format": "float" + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + } + ] }, "used": { - "type": "number", - "format": "float" + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + } + ] } } }