Skip to content

Commit

Permalink
fix: openapi spec
Browse files Browse the repository at this point in the history
  • Loading branch information
asabya committed Oct 22, 2024
1 parent a0d5930 commit f5e2ce8
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 141 deletions.
2 changes: 1 addition & 1 deletion pkg/api/pod_share.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
104 changes: 52 additions & 52 deletions swagger/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
104 changes: 52 additions & 52 deletions swagger/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
72 changes: 36 additions & 36 deletions swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f5e2ce8

Please sign in to comment.