diff --git a/pkg/api/pod_share.go b/pkg/api/pod_share.go index 5e480f81..ce690356 100644 --- a/pkg/api/pod_share.go +++ b/pkg/api/pod_share.go @@ -183,7 +183,7 @@ func (h *Handler) PodReceiveInfoHandler(w http.ResponseWriter, r *http.Request) // @Success 200 {object} pod.DirSnapShot // @Failure 400 {object} response // @Failure 500 {object} response -// @Router /v1/pod/snapshot [get] +// @Router /public-pod-snapshot [get] func (h *Handler) PodReceiveSnapshotHandler(w http.ResponseWriter, r *http.Request) { sharingRefString := r.URL.Query().Get("sharingRef") diff --git a/swagger/docs.go b/swagger/docs.go index e4b32007..f038ac2e 100644 --- a/swagger/docs.go +++ b/swagger/docs.go @@ -183,6 +183,58 @@ const docTemplate = `{ } } }, + "/public-pod-snapshot": { + "get": { + "description": "PodReceiveSnapshotHandler is the api handler to receive shared pod snapshot from shared reference", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "pod" + ], + "summary": "Receive shared pod snapshot", + "operationId": "pod-receive-snapshot-handler", + "parameters": [ + { + "type": "string", + "description": "pod sharing reference", + "name": "sharingRef", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "cookie parameter", + "name": "Cookie", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/pod.DirSnapShot" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/api.response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/api.response" + } + } + } + } + }, "/public/{ref}/{file}": { "get": { "description": "PublicPodFilePathHandler is the api handler to download file from a shared pod", @@ -4136,58 +4188,6 @@ const docTemplate = `{ } } }, - "/v1/pod/snapshot": { - "get": { - "description": "PodReceiveSnapshotHandler is the api handler to receive shared pod snapshot from shared reference", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "pod" - ], - "summary": "Receive shared pod snapshot", - "operationId": "pod-receive-snapshot-handler", - "parameters": [ - { - "type": "string", - "description": "pod sharing reference", - "name": "sharingRef", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "cookie parameter", - "name": "Cookie", - "in": "header", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/pod.DirSnapShot" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/api.response" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/api.response" - } - } - } - } - }, "/v1/pod/stat": { "get": { "description": "PodStatHandler is the api handler get information about a pod", diff --git a/swagger/swagger.json b/swagger/swagger.json index 1356cf46..928f9ecf 100644 --- a/swagger/swagger.json +++ b/swagger/swagger.json @@ -174,6 +174,58 @@ } } }, + "/public-pod-snapshot": { + "get": { + "description": "PodReceiveSnapshotHandler is the api handler to receive shared pod snapshot from shared reference", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "pod" + ], + "summary": "Receive shared pod snapshot", + "operationId": "pod-receive-snapshot-handler", + "parameters": [ + { + "type": "string", + "description": "pod sharing reference", + "name": "sharingRef", + "in": "query", + "required": true + }, + { + "type": "string", + "description": "cookie parameter", + "name": "Cookie", + "in": "header", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/pod.DirSnapShot" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/api.response" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/api.response" + } + } + } + } + }, "/public/{ref}/{file}": { "get": { "description": "PublicPodFilePathHandler is the api handler to download file from a shared pod", @@ -4127,58 +4179,6 @@ } } }, - "/v1/pod/snapshot": { - "get": { - "description": "PodReceiveSnapshotHandler is the api handler to receive shared pod snapshot from shared reference", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "tags": [ - "pod" - ], - "summary": "Receive shared pod snapshot", - "operationId": "pod-receive-snapshot-handler", - "parameters": [ - { - "type": "string", - "description": "pod sharing reference", - "name": "sharingRef", - "in": "query", - "required": true - }, - { - "type": "string", - "description": "cookie parameter", - "name": "Cookie", - "in": "header", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/pod.DirSnapShot" - } - }, - "400": { - "description": "Bad Request", - "schema": { - "$ref": "#/definitions/api.response" - } - }, - "500": { - "description": "Internal Server Error", - "schema": { - "$ref": "#/definitions/api.response" - } - } - } - } - }, "/v1/pod/stat": { "get": { "description": "PodStatHandler is the api handler get information about a pod", diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 5c7b77dc..1b65a89e 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -748,6 +748,42 @@ paths: summary: get key from public pod tags: - public + /public-pod-snapshot: + get: + consumes: + - application/json + description: PodReceiveSnapshotHandler is the api handler to receive shared + pod snapshot from shared reference + operationId: pod-receive-snapshot-handler + parameters: + - description: pod sharing reference + in: query + name: sharingRef + required: true + type: string + - description: cookie parameter + in: header + name: Cookie + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/pod.DirSnapShot' + "400": + description: Bad Request + schema: + $ref: '#/definitions/api.response' + "500": + description: Internal Server Error + schema: + $ref: '#/definitions/api.response' + summary: Receive shared pod snapshot + tags: + - pod /public/{ref}/{file}: get: consumes: @@ -3447,42 +3483,6 @@ paths: summary: Share pod tags: - pod - /v1/pod/snapshot: - get: - consumes: - - application/json - description: PodReceiveSnapshotHandler is the api handler to receive shared - pod snapshot from shared reference - operationId: pod-receive-snapshot-handler - parameters: - - description: pod sharing reference - in: query - name: sharingRef - required: true - type: string - - description: cookie parameter - in: header - name: Cookie - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/pod.DirSnapShot' - "400": - description: Bad Request - schema: - $ref: '#/definitions/api.response' - "500": - description: Internal Server Error - schema: - $ref: '#/definitions/api.response' - summary: Receive shared pod snapshot - tags: - - pod /v1/pod/stat: get: consumes: