From ea7ef259b044cd8dbcacbb5fa831d06997d5dc40 Mon Sep 17 00:00:00 2001 From: yuyi Date: Wed, 21 Feb 2024 20:22:23 +0800 Subject: [PATCH] docs(swag): update swagger docs --- distribution/dashboard/docs/docs.go | 25 +++++++++++++++--------- distribution/dashboard/docs/swagger.json | 25 +++++++++++++++--------- distribution/dashboard/docs/swagger.yaml | 17 +++++++++++----- 3 files changed, 44 insertions(+), 23 deletions(-) diff --git a/distribution/dashboard/docs/docs.go b/distribution/dashboard/docs/docs.go index aa6de1029..6c8e5b7dc 100644 --- a/distribution/dashboard/docs/docs.go +++ b/distribution/dashboard/docs/docs.go @@ -2354,16 +2354,12 @@ const docTemplate = `{ }, "param.ChangeTenantRole": { "type": "object", - "required": [ - "tenantRole" - ], "properties": { - "switchover": { + "failover": { "type": "boolean" }, - "tenantRole": { - "description": "Enum: Primary, Standby", - "type": "string" + "switchover": { + "type": "boolean" } } }, @@ -2386,6 +2382,8 @@ const docTemplate = `{ "param.CreateBackupPolicy": { "type": "object", "required": [ + "archivePath", + "bakDataPath", "destType" ], "properties": { @@ -2680,7 +2678,8 @@ const docTemplate = `{ "type": "object", "properties": { "timestamp": { - "type": "string" + "type": "string", + "example": "2024-02-23 17:47:00" }, "unlimited": { "type": "boolean" @@ -2707,6 +2706,11 @@ const docTemplate = `{ }, "param.RestoreSourceSpec": { "type": "object", + "required": [ + "archiveSource", + "bakDataSource", + "type" + ], "properties": { "archiveSource": { "type": "string" @@ -2736,7 +2740,8 @@ const docTemplate = `{ "type": "object", "properties": { "timestamp": { - "type": "string" + "type": "string", + "example": "2024-02-23 17:47:00" }, "unlimited": { "type": "boolean" @@ -2927,6 +2932,8 @@ const docTemplate = `{ "response.BackupPolicy": { "type": "object", "required": [ + "archivePath", + "bakDataPath", "destType" ], "properties": { diff --git a/distribution/dashboard/docs/swagger.json b/distribution/dashboard/docs/swagger.json index e01d26137..ee48fd3b4 100644 --- a/distribution/dashboard/docs/swagger.json +++ b/distribution/dashboard/docs/swagger.json @@ -2347,16 +2347,12 @@ }, "param.ChangeTenantRole": { "type": "object", - "required": [ - "tenantRole" - ], "properties": { - "switchover": { + "failover": { "type": "boolean" }, - "tenantRole": { - "description": "Enum: Primary, Standby", - "type": "string" + "switchover": { + "type": "boolean" } } }, @@ -2379,6 +2375,8 @@ "param.CreateBackupPolicy": { "type": "object", "required": [ + "archivePath", + "bakDataPath", "destType" ], "properties": { @@ -2673,7 +2671,8 @@ "type": "object", "properties": { "timestamp": { - "type": "string" + "type": "string", + "example": "2024-02-23 17:47:00" }, "unlimited": { "type": "boolean" @@ -2700,6 +2699,11 @@ }, "param.RestoreSourceSpec": { "type": "object", + "required": [ + "archiveSource", + "bakDataSource", + "type" + ], "properties": { "archiveSource": { "type": "string" @@ -2729,7 +2733,8 @@ "type": "object", "properties": { "timestamp": { - "type": "string" + "type": "string", + "example": "2024-02-23 17:47:00" }, "unlimited": { "type": "boolean" @@ -2920,6 +2925,8 @@ "response.BackupPolicy": { "type": "object", "required": [ + "archivePath", + "bakDataPath", "destType" ], "properties": { diff --git a/distribution/dashboard/docs/swagger.yaml b/distribution/dashboard/docs/swagger.yaml index f38d0d693..45b9258c5 100644 --- a/distribution/dashboard/docs/swagger.yaml +++ b/distribution/dashboard/docs/swagger.yaml @@ -23,13 +23,10 @@ definitions: type: object param.ChangeTenantRole: properties: + failover: + type: boolean switchover: type: boolean - tenantRole: - description: 'Enum: Primary, Standby' - type: string - required: - - tenantRole type: object param.ChangeUserPassword: properties: @@ -86,6 +83,8 @@ definitions: example: Weekly type: string required: + - archivePath + - bakDataPath - destType type: object param.CreateNamespaceParam: @@ -246,6 +245,7 @@ definitions: param.ReplayStandbyLog: properties: timestamp: + example: "2024-02-23 17:47:00" type: string unlimited: type: boolean @@ -279,10 +279,15 @@ definitions: type: string until: $ref: '#/definitions/param.RestoreUntilConfig' + required: + - archiveSource + - bakDataSource + - type type: object param.RestoreUntilConfig: properties: timestamp: + example: "2024-02-23 17:47:00" type: string unlimited: type: boolean @@ -459,6 +464,8 @@ definitions: tenantName: type: string required: + - archivePath + - bakDataPath - destType type: object response.DashboardInfo: