mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix specs and sdk generation
This commit is contained in:
@@ -25446,12 +25446,33 @@
|
||||
"Temporary Redirect 307",
|
||||
"Permanent Redirect 308"
|
||||
]
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "ID of parent resource.",
|
||||
"x-example": "<RESOURCE_ID>"
|
||||
},
|
||||
"resourceType": {
|
||||
"type": "string",
|
||||
"description": "Type of parent resource.",
|
||||
"x-example": "site",
|
||||
"enum": [
|
||||
"site",
|
||||
"function"
|
||||
],
|
||||
"x-enum-name": "ProxyResourceType",
|
||||
"x-enum-keys": [
|
||||
"Site",
|
||||
"Function"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"domain",
|
||||
"url",
|
||||
"statusCode"
|
||||
"statusCode",
|
||||
"resourceId",
|
||||
"resourceType"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25696,12 +25696,35 @@
|
||||
"Temporary Redirect 307",
|
||||
"Permanent Redirect 308"
|
||||
]
|
||||
},
|
||||
"resourceId": {
|
||||
"type": "string",
|
||||
"description": "ID of parent resource.",
|
||||
"default": null,
|
||||
"x-example": "<RESOURCE_ID>"
|
||||
},
|
||||
"resourceType": {
|
||||
"type": "string",
|
||||
"description": "Type of parent resource.",
|
||||
"default": null,
|
||||
"x-example": "site",
|
||||
"enum": [
|
||||
"site",
|
||||
"function"
|
||||
],
|
||||
"x-enum-name": "ProxyResourceType",
|
||||
"x-enum-keys": [
|
||||
"Site",
|
||||
"Function"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"domain",
|
||||
"url",
|
||||
"statusCode"
|
||||
"statusCode",
|
||||
"resourceId",
|
||||
"resourceType"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,6 +113,16 @@ abstract class Format
|
||||
protected function getEnumName(string $service, string $method, string $param): ?string
|
||||
{
|
||||
switch ($service) {
|
||||
case 'proxy':
|
||||
switch ($method) {
|
||||
case 'createRedirectRule':
|
||||
switch ($param) {
|
||||
case 'resourceType':
|
||||
return 'ProxyResourceType';
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'console':
|
||||
switch ($method) {
|
||||
case 'getResource':
|
||||
@@ -441,7 +451,13 @@ abstract class Format
|
||||
case 'proxy':
|
||||
switch ($method) {
|
||||
case 'createRedirectRule':
|
||||
return ['Moved Permanently 301', 'Found 302', 'Temporary Redirect 307', 'Permanent Redirect 308'];
|
||||
switch ($param) {
|
||||
case 'statusCode':
|
||||
return ['Moved Permanently 301', 'Found 302', 'Temporary Redirect 307', 'Permanent Redirect 308'];
|
||||
case 'resourceType':
|
||||
return ['Site', 'Function'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'functions':
|
||||
|
||||
Reference in New Issue
Block a user