diff --git a/docs/docs.go b/docs/docs.go index ca3c7e4..daad4e5 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -61,6 +61,50 @@ const docTemplate = `{ } } }, + "/merch/list": { + "get": { + "description": "Get all merch without origins", + "produces": [ + "application/json" + ], + "tags": [ + "Merch" + ], + "summary": "Get all merch", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/merch.merchDTO" + } + } + }, + "204": { + "description": "No Content" + }, + "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/origins": { "get": { "description": "Get all origins", @@ -189,6 +233,50 @@ const docTemplate = `{ } } } + }, + "/merch/{uuid}": { + "delete": { + "description": "Marks merch and all its extra data as deleted by uuid.", + "consumes": [ + "application/json" + ], + "tags": [ + "Merch" + ], + "summary": "Delete merch", + "parameters": [ + { + "type": "string", + "description": "merch uuid", + "name": "uuid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "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" + } + } + } + } } }, "definitions": { @@ -200,6 +288,23 @@ const docTemplate = `{ } } }, + "merch.merchDTO": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "merch_uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, "merch.newMerchDTO": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index da9a4a8..538a85f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -54,6 +54,50 @@ } } }, + "/merch/list": { + "get": { + "description": "Get all merch without origins", + "produces": [ + "application/json" + ], + "tags": [ + "Merch" + ], + "summary": "Get all merch", + "responses": { + "200": { + "description": "OK", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/merch.merchDTO" + } + } + }, + "204": { + "description": "No Content" + }, + "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/origins": { "get": { "description": "Get all origins", @@ -182,6 +226,50 @@ } } } + }, + "/merch/{uuid}": { + "delete": { + "description": "Marks merch and all its extra data as deleted by uuid.", + "consumes": [ + "application/json" + ], + "tags": [ + "Merch" + ], + "summary": "Delete merch", + "parameters": [ + { + "type": "string", + "description": "merch uuid", + "name": "uuid", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "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" + } + } + } + } } }, "definitions": { @@ -193,6 +281,23 @@ } } }, + "merch.merchDTO": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "merch_uuid": { + "type": "string" + }, + "name": { + "type": "string" + }, + "updated_at": { + "type": "string" + } + } + }, "merch.newMerchDTO": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index f670148..9e78a95 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -5,6 +5,17 @@ definitions: name: type: string type: object + merch.merchDTO: + properties: + created_at: + type: string + merch_uuid: + type: string + name: + type: string + updated_at: + type: string + type: object merch.newMerchDTO: properties: links: @@ -64,6 +75,35 @@ info: title: Merch API version: "2.3" paths: + /merch/{uuid}: + delete: + consumes: + - application/json + description: Marks merch and all its extra data as deleted by uuid. + parameters: + - description: merch uuid + in: path + name: uuid + required: true + type: string + responses: + "204": + description: No Content + "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' + summary: Delete merch + tags: + - Merch /merch/create: post: consumes: @@ -94,6 +134,35 @@ paths: summary: Create new merch tags: - Merch + /merch/list: + get: + description: Get all merch without origins + produces: + - application/json + responses: + "200": + description: OK + schema: + items: + $ref: '#/definitions/merch.merchDTO' + type: array + "204": + description: No Content + "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' + summary: Get all merch + tags: + - Merch /merch/origins: delete: consumes: