Add OpenStack request-body schemas and nested console PARAM sync.

This commit is contained in:
2026-07-18 08:47:16 +03:00
parent 6033967e6a
commit 2a8ce3a287
101 changed files with 150428 additions and 612 deletions
+1 -10
View File
@@ -14,21 +14,12 @@ from fastapi.responses import JSONResponse
from app.openstack.auth import TokenContext
from app.openstack.deps import get_conn, require_project_token, require_token
from app.openstack.errors import OpenStackError
from app.openstack.singular import singular as _singular
from app.openstack.surface import SERVICES, ServiceSpec
_PATH_PARAM = re.compile(r"\{([^{}]+)\}")
def _singular(collection_key: str) -> str:
if collection_key.endswith("ies"):
return collection_key[:-3] + "y"
if collection_key.endswith("ses"):
return collection_key[:-2]
if collection_key.endswith("s") and not collection_key.endswith("ss"):
return collection_key[:-1]
return collection_key
def _wrap_list(collection_key: str, items: list[dict[str, Any]]) -> dict[str, Any]:
return {collection_key: items}