fix: specs

This commit is contained in:
Chirag Aggarwal
2025-09-04 22:45:46 +05:30
parent d2b681e95c
commit a47d581eea
8 changed files with 18 additions and 18 deletions
+2 -2
View File
@@ -1891,7 +1891,7 @@
"prefs": {
"type": "object",
"description": "Prefs key-value JSON object.",
"x-example": "{}"
"x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}"
}
},
"required": [
@@ -5020,7 +5020,7 @@
"data": {
"type": "object",
"description": "Document data as JSON object.",
"x-example": "{}"
"x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}"
},
"permissions": {
"type": "array",
@@ -1911,7 +1911,7 @@
"prefs": {
"type": "object",
"description": "Prefs key-value JSON object.",
"x-example": "{}"
"x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}"
}
},
"required": [
@@ -9575,7 +9575,7 @@
"data": {
"type": "object",
"description": "Document data as JSON object.",
"x-example": "{}"
"x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}"
},
"permissions": {
"type": "array",
@@ -15150,7 +15150,7 @@
},
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get stats resources queue",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"tags": [
"health"
+3 -3
View File
@@ -1926,7 +1926,7 @@
"prefs": {
"type": "object",
"description": "Prefs key-value JSON object.",
"x-example": "{}"
"x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}"
}
},
"required": [
@@ -9057,7 +9057,7 @@
"data": {
"type": "object",
"description": "Document data as JSON object.",
"x-example": "{}"
"x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}"
},
"permissions": {
"type": "array",
@@ -13887,7 +13887,7 @@
},
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get stats resources queue",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"tags": [
"health"
+2 -2
View File
@@ -1979,7 +1979,7 @@
"type": "object",
"description": "Prefs key-value JSON object.",
"default": {},
"x-example": "{}"
"x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}"
}
},
"required": [
@@ -5154,7 +5154,7 @@
"type": "object",
"description": "Document data as JSON object.",
"default": [],
"x-example": "{}"
"x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}"
},
"permissions": {
"type": "array",
+3 -3
View File
@@ -2009,7 +2009,7 @@
"type": "object",
"description": "Prefs key-value JSON object.",
"default": {},
"x-example": "{}"
"x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}"
}
},
"required": [
@@ -9680,7 +9680,7 @@
"type": "object",
"description": "Document data as JSON object.",
"default": [],
"x-example": "{}"
"x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}"
},
"permissions": {
"type": "array",
@@ -15186,7 +15186,7 @@
},
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get stats resources queue",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"consumes": [],
"produces": [
+3 -3
View File
@@ -2023,7 +2023,7 @@
"type": "object",
"description": "Prefs key-value JSON object.",
"default": {},
"x-example": "{}"
"x-example": "{\"language\":\"en\",\"timezone\":\"UTC\",\"darkTheme\":true}"
}
},
"required": [
@@ -9152,7 +9152,7 @@
"type": "object",
"description": "Document data as JSON object.",
"default": [],
"x-example": "{}"
"x-example": "{\"username\":\"john.doe\",\"email\":\"john.doe@example.com\",\"fullName\":\"John Doe\",\"age\":30,\"isAdmin\":false}"
},
"permissions": {
"type": "array",
@@ -13952,7 +13952,7 @@
},
"\/health\/queue\/stats-resources": {
"get": {
"summary": "Get stats resources queue",
"summary": "Get stats resources queue",
"operationId": "healthGetQueueStatsResources",
"consumes": [],
"produces": [
@@ -433,7 +433,7 @@ class OpenAPI3 extends Format
case 'Utopia\Validator\Assoc':
$param['default'] = (empty($param['default'])) ? new \stdClass() : $param['default'];
$node['schema']['type'] = 'object';
$node['schema']['x-example'] = $param['example'] ?? '{}';
$node['schema']['x-example'] = ($param['example'] ?? '') ?: '{}';
break;
case 'Utopia\Storage\Validator\File':
$consumes = ['multipart/form-data'];
@@ -467,7 +467,7 @@ class Swagger2 extends Format
case 'Utopia\Validator\Assoc':
$node['type'] = 'object';
$node['default'] = (empty($param['default'])) ? new \stdClass() : $param['default'];
$node['schema']['x-example'] = $param['example'] ?? '{}';
$node['x-example'] = ($param['example'] ?? '') ?: '{}';
break;
case 'Utopia\Storage\Validator\File':
$consumes = ['multipart/form-data'];