swagger docs update
This commit is contained in:
parent
71d13bb217
commit
cfccb19666
3 changed files with 381 additions and 6 deletions
145
docs/docs.go
145
docs/docs.go
|
|
@ -61,6 +61,65 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"/merch/extra/{uuid}": {
|
||||
"put": {
|
||||
"description": "Update ONLY merch extra data",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Merch"
|
||||
],
|
||||
"summary": "Update merch extra data",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "merch uuid",
|
||||
"name": "uuid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.extraDataDTO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.extraDataDTO"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.BadRequest"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.Unauthorized"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/merch/list": {
|
||||
"get": {
|
||||
"description": "Get all merch without origins",
|
||||
|
|
@ -235,6 +294,63 @@ const docTemplate = `{
|
|||
}
|
||||
},
|
||||
"/merch/{uuid}": {
|
||||
"put": {
|
||||
"description": "Update merch general info (except extra data)",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Merch"
|
||||
],
|
||||
"summary": "Update merch",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "merch uuid",
|
||||
"name": "uuid",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.updateMerchDTO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/merch.merchDTO"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.BadRequest"
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.Unauthorized"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/responses.InternalServerError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"description": "Marks merch and all its extra data as deleted by uuid.",
|
||||
"consumes": [
|
||||
|
|
@ -288,6 +404,20 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.extraDataDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"links": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/merch.originLink"
|
||||
}
|
||||
},
|
||||
"merch_uuid": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"merch.merchDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
@ -341,10 +471,10 @@ const docTemplate = `{
|
|||
"merch.originLink": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"origin_link": {
|
||||
"origin": {
|
||||
"type": "string"
|
||||
},
|
||||
"origin_name": {
|
||||
"origin_link": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
|
|
@ -360,6 +490,17 @@ const docTemplate = `{
|
|||
}
|
||||
}
|
||||
},
|
||||
"merch.updateMerchDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"merch_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses.BadRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue