This commit is contained in:
parent
c2304f6a7d
commit
f561869b08
4 changed files with 35 additions and 34 deletions
25
docs/docs.go
25
docs/docs.go
|
|
@ -169,7 +169,7 @@ const docTemplate = `{
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/merch.PricesResponse"
|
"$ref": "#/definitions/merch.ImageLink"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -267,21 +267,11 @@ const docTemplate = `{
|
||||||
"name": "uuid",
|
"name": "uuid",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "image type",
|
|
||||||
"name": "type",
|
|
||||||
"in": "query",
|
|
||||||
"required": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK"
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/merch.PricesResponse"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
|
|
@ -778,6 +768,17 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"merch.ImageLink": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"etag": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"merch.ListResponse": {
|
"merch.ListResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/merch.PricesResponse"
|
"$ref": "#/definitions/merch.ImageLink"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
|
|
@ -259,21 +259,11 @@
|
||||||
"name": "uuid",
|
"name": "uuid",
|
||||||
"in": "path",
|
"in": "path",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "string",
|
|
||||||
"description": "image type",
|
|
||||||
"name": "type",
|
|
||||||
"in": "query",
|
|
||||||
"required": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK"
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/merch.PricesResponse"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"400": {
|
"400": {
|
||||||
"description": "Bad Request",
|
"description": "Bad Request",
|
||||||
|
|
@ -770,6 +760,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"definitions": {
|
"definitions": {
|
||||||
|
"merch.ImageLink": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"etag": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"link": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"merch.ListResponse": {
|
"merch.ListResponse": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
basePath: /api/v2
|
basePath: /api/v2
|
||||||
definitions:
|
definitions:
|
||||||
|
merch.ImageLink:
|
||||||
|
properties:
|
||||||
|
etag:
|
||||||
|
type: string
|
||||||
|
link:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
merch.ListResponse:
|
merch.ListResponse:
|
||||||
properties:
|
properties:
|
||||||
merch_uuid:
|
merch_uuid:
|
||||||
|
|
@ -271,16 +278,9 @@ paths:
|
||||||
name: uuid
|
name: uuid
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- description: image type
|
|
||||||
in: query
|
|
||||||
name: type
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/merch.PricesResponse'
|
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
@ -311,7 +311,7 @@ paths:
|
||||||
"200":
|
"200":
|
||||||
description: OK
|
description: OK
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/merch.PricesResponse'
|
$ref: '#/definitions/merch.ImageLink'
|
||||||
"400":
|
"400":
|
||||||
description: Bad Request
|
description: Bad Request
|
||||||
schema:
|
schema:
|
||||||
|
|
|
||||||
|
|
@ -370,8 +370,7 @@ func (co *controller) getMerchImage(c *gin.Context) {
|
||||||
// @Tags Merch images
|
// @Tags Merch images
|
||||||
// @Security BearerAuth
|
// @Security BearerAuth
|
||||||
// @Param uuid path string true "merch_uuid"
|
// @Param uuid path string true "merch_uuid"
|
||||||
// @Param type query string true "image type"
|
// @Success 200
|
||||||
// @Success 200 {object} PricesResponse
|
|
||||||
// @Failure 400 {object} responses.ErrorResponse400
|
// @Failure 400 {object} responses.ErrorResponse400
|
||||||
// @Failure 500 {object} responses.ErrorResponse500
|
// @Failure 500 {object} responses.ErrorResponse500
|
||||||
// @Router /merch/images/{uuid} [delete]
|
// @Router /merch/images/{uuid} [delete]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue