修复全量审查问题;设置接口PATCH化;回传指纹加固
CI / test (push) Successful in 32s

This commit is contained in:
2026-07-22 16:51:23 +08:00
parent 0614ef22af
commit f51fb6c722
66 changed files with 3997 additions and 687 deletions
+305 -18
View File
@@ -608,7 +608,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/internal_api.pagedResponse-oci-portal_internal_model_AiCallLog"
"$ref": "#/definitions/internal_api.pagedResponse-oci-portal_internal_model_AiContentLog"
}
}
}
@@ -780,7 +780,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/internal_api.pagedResponse-oci-portal_internal_model_AiContentLog"
"$ref": "#/definitions/internal_api.pagedResponse-oci-portal_internal_model_AiCallLog"
}
}
}
@@ -930,8 +930,14 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "已更新,返回换发的新 token",
"schema": {
"$ref": "#/definitions/internal_api.tokenResponse"
}
},
"204": {
"description": "已更新,请重新登录"
"description": "已更新但新 token 签发失败,需重新登录"
},
"401": {
"description": "当前密码错误",
@@ -984,8 +990,14 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "已解绑,返回换发的新 token",
"schema": {
"$ref": "#/definitions/internal_api.tokenResponse"
}
},
"204": {
"description": "已解绑"
"description": "已解绑但新 token 签发失败,需重新登录"
},
"409": {
"description": "最后一个身份不可解绑",
@@ -1165,8 +1177,14 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "已保存,返回换发的新 token",
"schema": {
"$ref": "#/definitions/internal_api.tokenResponse"
}
},
"204": {
"description": "已保存"
"description": "已保存但新 token 签发失败,需重新登录"
},
"409": {
"description": "未绑定外部身份",
@@ -1242,8 +1260,14 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "已启用,返回换发的新 token",
"schema": {
"$ref": "#/definitions/internal_api.tokenResponse"
}
},
"204": {
"description": "已启用"
"description": "已启用但新 token 签发失败,需重新登录"
}
}
}
@@ -1271,8 +1295,14 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "已停用,返回换发的新 token",
"schema": {
"$ref": "#/definitions/internal_api.tokenResponse"
}
},
"204": {
"description": "已停用"
"description": "已停用但新 token 签发失败,需重新登录"
}
}
}
@@ -2473,6 +2503,15 @@ const docTemplate = `{
"schema": {
"$ref": "#/definitions/oci-portal_internal_oci.PAR"
}
},
"400": {
"description": "accessType 或 expiresHours 非法",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
@@ -2522,8 +2561,17 @@ const docTemplate = `{
}
],
"responses": {
"200": {
"description": "all=1 时返回 {deleted: n}",
"schema": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
},
"204": {
"description": "删除成功,链接立即失效"
"description": "按 parId 删单条成功,链接立即失效"
}
}
}
@@ -2801,6 +2849,7 @@ const docTemplate = `{
"BearerAuth": []
}
],
"description": "创建禁用态 IdP;若 IdP 已创建但 JIT 后置配置失败且回滚无法确认,仍返回 201,并在 setupWarning 中标明部分成功",
"tags": [
"租户 IAM"
],
@@ -2833,7 +2882,7 @@ const docTemplate = `{
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/oci-portal_internal_oci.IdentityProviderInfo"
"$ref": "#/definitions/internal_api.createIdpResponse"
}
}
}
@@ -3010,6 +3059,128 @@ const docTemplate = `{
}
}
},
"/api/v1/oci-configs/{id}/idp-icons": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "上传到身份域公共图片存储(/storage/v1/Images),返回可填入 iconUrl 的公网地址",
"consumes": [
"multipart/form-data"
],
"tags": [
"租户 IAM"
],
"summary": "上传身份提供商图标",
"parameters": [
{
"type": "integer",
"description": "配置 ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "身份域 OCID(缺省 Default 域)",
"name": "domainId",
"in": "query"
},
{
"type": "file",
"description": "图标文件(png/jpg/jpeg/gif/svg/webp/ico,≤1MB)",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/internal_api.idpIconResponse"
}
},
"400": {
"description": "缺文件字段、文件为空或文件名非法",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"413": {
"description": "文件超过 1MB",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"415": {
"description": "扩展名不支持或与文件内容不符",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"security": [
{
"BearerAuth": []
}
],
"description": "使用上传响应中的 fileName 删除身份域公开图片;404 按已删除处理",
"tags": [
"租户 IAM"
],
"summary": "删除身份提供商图标",
"parameters": [
{
"type": "integer",
"description": "配置 ID",
"name": "id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "身份域 OCID(缺省 Default 域)",
"name": "domainId",
"in": "query"
},
{
"type": "string",
"description": "上传响应返回的 IdP 图标存储标识(images/idp-icon-\u003c32hex\u003e.\u003cext\u003e)",
"name": "fileName",
"in": "query",
"required": true
}
],
"responses": {
"204": {
"description": "无内容"
},
"400": {
"description": "fileName 缺失或不是本服务生成的 IdP 图标标识",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/v1/oci-configs/{id}/images": {
"get": {
"security": [
@@ -6711,7 +6882,7 @@ const docTemplate = `{
}
}
},
"put": {
"patch": {
"security": [
{
"BearerAuth": []
@@ -6720,10 +6891,10 @@ const docTemplate = `{
"tags": [
"设置"
],
"summary": "保存 OAuth provider 配置",
"summary": "部分更新 OAuth provider 配置",
"parameters": [
{
"description": "provider 配置",
"description": "出现的字段才会被更新",
"name": "body",
"in": "body",
"required": true,
@@ -6762,7 +6933,7 @@ const docTemplate = `{
}
}
},
"put": {
"patch": {
"security": [
{
"BearerAuth": []
@@ -6771,15 +6942,15 @@ const docTemplate = `{
"tags": [
"设置"
],
"summary": "保存安全设置并返回最新值",
"summary": "部分更新安全设置并返回最新值",
"parameters": [
{
"description": "请求体",
"description": "出现的字段才会被更新",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/oci-portal_internal_service.SecuritySettings"
"$ref": "#/definitions/oci-portal_internal_service.SecurityPatch"
}
}
],
@@ -7036,7 +7207,7 @@ const docTemplate = `{
"required": true
},
{
"description": "可更新字段",
"description": "可更新字段;抢机 payload 的 count 语义为目标台数",
"name": "body",
"in": "body",
"required": true,
@@ -7051,6 +7222,18 @@ const docTemplate = `{
"schema": {
"$ref": "#/definitions/oci-portal_internal_model.Task"
}
},
"400": {
"description": "参数非法或抢机目标不大于已完成数量",
"schema": {
"$ref": "#/definitions/internal_api.errorResponse"
}
},
"409": {
"description": "任务被并发修改,须刷新重试",
"schema": {
"$ref": "#/definitions/internal_api.errorResponse"
}
}
}
},
@@ -7448,6 +7631,35 @@ const docTemplate = `{
}
}
},
"internal_api.createIdpResponse": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"id": {
"type": "string"
},
"jitEnabled": {
"type": "boolean"
},
"name": {
"type": "string"
},
"partnerProviderId": {
"type": "string"
},
"setupWarning": {
"$ref": "#/definitions/internal_api.idpSetupWarning"
},
"timeCreated": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"internal_api.createInstanceRequest": {
"type": "object",
"required": [
@@ -7759,6 +7971,34 @@ const docTemplate = `{
}
}
},
"internal_api.idpIconResponse": {
"type": "object",
"properties": {
"fileName": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"internal_api.idpSetupWarning": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"requestId": {
"type": "string"
},
"resourceCreated": {
"type": "boolean"
}
}
},
"internal_api.importRequest": {
"type": "object",
"required": [
@@ -11335,6 +11575,13 @@ const docTemplate = `{
"hasActiveTask": {
"type": "boolean"
},
"series": {
"description": "Series 按币种拆分的序列(合计降序);顶层 Currency/Total/Days 恒为首个\n(主)币种,多币种租户的其余币种只出现在 Series,不与主币种相加。",
"type": "array",
"items": {
"$ref": "#/definitions/oci-portal_internal_service.OverviewCostSeries"
}
},
"total": {
"type": "number"
}
@@ -11351,6 +11598,23 @@ const docTemplate = `{
}
}
},
"oci-portal_internal_service.OverviewCostSeries": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"days": {
"type": "array",
"items": {
"$ref": "#/definitions/oci-portal_internal_service.OverviewCostDay"
}
},
"total": {
"type": "number"
}
}
},
"oci-portal_internal_service.OverviewTasks": {
"type": "object",
"properties": {
@@ -11525,6 +11789,29 @@ const docTemplate = `{
}
}
},
"oci-portal_internal_service.SecurityPatch": {
"type": "object",
"properties": {
"appUrl": {
"type": "string"
},
"ipRateBurst": {
"type": "integer"
},
"ipRateRps": {
"type": "integer"
},
"loginFailLimit": {
"type": "integer"
},
"loginLockMinutes": {
"type": "integer"
},
"realIpHeader": {
"type": "string"
}
}
},
"oci-portal_internal_service.SecuritySettings": {
"type": "object",
"properties": {
@@ -11639,7 +11926,7 @@ const docTemplate = `{
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "0.0.1",
Version: "0.8.0",
Host: "",
BasePath: "/",
Schemes: []string{},