From d0193926458f0ba05a26c322bd0bee531be22220 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 | 8 ++-- apps/provisioning_api/openapi.json | 48 +++++++++++++++---- 2 files changed, 44 insertions(+), 12 deletions(-) diff --git a/apps/provisioning_api/lib/ResponseDefinitions.php b/apps/provisioning_api/lib/ResponseDefinitions.php index edb9138659ada..071faee59769c 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, + * relative?: float|int, + * 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..df6427f150b3f 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": [ @@ -526,16 +534,40 @@ ] }, "relative": { - "type": "number", - "format": "float" + "oneOf": [ + { + "type": "number", + "format": "float" + }, + { + "type": "integer", + "format": "int64" + } + ] }, "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" + } + ] } } }