feat(projects): automate project infrastructure provisioning
Generic Container CI/CD / test-build-publish (push) Successful in 1m13s
Server CI/CD v2 / build-test-publish-and-deploy (push) Successful in 1m13s

This commit is contained in:
2026-09-11 10:57:51 +08:00
parent 10a7a66a41
commit 90b02057bc
38 changed files with 2345 additions and 189 deletions
+197 -1
View File
@@ -491,6 +491,65 @@
"title": "Body_patch_admin_projects_project_id_model_imports",
"type": "object"
},
"Body_post_admin_project_provisions": {
"properties": {
"code": {
"maxLength": 50,
"minLength": 1,
"title": "Code",
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Description"
},
"file": {
"description": "EPANET INP 模型文件",
"format": "binary",
"title": "File",
"type": "string"
},
"gs_workspace": {
"anyOf": [
{
"maxLength": 100,
"type": "string"
},
{
"type": "null"
}
],
"title": "Gs Workspace"
},
"map_zoom": {
"default": 14,
"maximum": 22.0,
"minimum": 1.0,
"title": "Map Zoom",
"type": "integer"
},
"name": {
"maxLength": 100,
"minLength": 1,
"title": "Name",
"type": "string"
}
},
"required": [
"name",
"code",
"file"
],
"title": "Body_post_admin_project_provisions",
"type": "object"
},
"Body_post_admin_projects_project_id_model_imports": {
"properties": {
"file": {
@@ -2014,6 +2073,46 @@
"title": "ProjectMetaResponse",
"type": "object"
},
"ProjectProvisionResponse": {
"properties": {
"business_database": {
"title": "Business Database",
"type": "string"
},
"geoserver_layers": {
"items": {
"type": "string"
},
"title": "Geoserver Layers",
"type": "array"
},
"geoserver_workspace": {
"title": "Geoserver Workspace",
"type": "string"
},
"model_template_database": {
"title": "Model Template Database",
"type": "string"
},
"project": {
"$ref": "#/components/schemas/AdminProjectResponse"
},
"timescale_database": {
"title": "Timescale Database",
"type": "string"
}
},
"required": [
"project",
"business_database",
"model_template_database",
"timescale_database",
"geoserver_workspace",
"geoserver_layers"
],
"title": "ProjectProvisionResponse",
"type": "object"
},
"ProjectSummaryResponse": {
"properties": {
"code": {
@@ -2879,6 +2978,102 @@
]
}
},
"/api/v1/admin/project-provisions": {
"post": {
"operationId": "post_admin_project_provisions",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_post_admin_project_provisions"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProjectProvisionResponse"
}
}
},
"description": "Successful Response"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
},
"description": "Authentication required"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
},
"description": "Insufficient permission"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
},
"description": "Resource not found"
},
"409": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
},
"description": "Resource conflict"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
},
"description": "Validation error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
},
"description": "Dependency unavailable"
}
},
"security": [
{
"OAuth2PasswordBearer": []
}
],
"summary": "创建完整供水项目",
"tags": [
"Model Administration"
]
}
},
"/api/v1/admin/projects": {
"get": {
"operationId": "get_admin_projects",
@@ -2990,6 +3185,7 @@
]
},
"post": {
"description": "仅用于登记已经由外部流程完整创建的资源。新项目应调用 POST /admin/project-provisions。",
"operationId": "post_admin_projects",
"requestBody": {
"content": {
@@ -3078,7 +3274,7 @@
"OAuth2PasswordBearer": []
}
],
"summary": "Create Admin Project",
"summary": "仅登记已有项目元数据",
"tags": [
"Metadata Admin"
]