Skip to content

Commit

Permalink
fix(provisioning_api): Fix quota fields in OpenAPI
Browse files Browse the repository at this point in the history
Signed-off-by: jld3103 <jld3103yt@gmail.com>
  • Loading branch information
provokateurin committed Oct 22, 2023
1 parent 4b70f19 commit 58c9266
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
6 changes: 3 additions & 3 deletions apps/provisioning_api/lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
36 changes: 30 additions & 6 deletions apps/provisioning_api/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,16 @@
"type": "object",
"properties": {
"free": {
"type": "number",
"format": "float"
"oneOf": [
{
"type": "number",
"format": "float"
},
{
"type": "integer",
"format": "int64"
}
]
},
"quota": {
"oneOf": [
Expand All @@ -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"
}
]
}
}
}
Expand Down

0 comments on commit 58c9266

Please sign in to comment.