From 74e49787f43f96f51a7f222cd0536b79b6f284fe Mon Sep 17 00:00:00 2001 From: luisramos0 Date: Thu, 12 Sep 2019 15:16:35 +0100 Subject: [PATCH] Add the remaining missing enterprises endpoints --- swagger.yaml | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-) diff --git a/swagger.yaml b/swagger.yaml index 386cff735b..25fff5dbc5 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -598,6 +598,106 @@ paths: schema: $ref: '#/components/schemas/Enterprise' + /enterprises/{enterprise_id}/shopfront: + get: + description: Fetch Enterprise shopfront details (products not included). + tags: + - enterprises + parameters: + - in: path + name: enterprise_id + schema: + type: integer + required: true + description: ID of the enterprise. + responses: + '200': + description: Enterprise shopfront details + content: + application/json: + schema: + $ref: '#/components/schemas/EnterpriseShopfront' + + /enterprises/{enterprise_id}/update_image: + post: + description: Update enterprise images, promo and logo. + tags: + - enterprises + parameters: + - in: path + name: enterprise_id + schema: + type: integer + required: true + description: ID of the enterprise. + - in: path + name: logo + schema: + type: string + format: binary + required: true + description: Binary of the logo image. + - in: path + name: promo + schema: + type: string + format: binary + required: true + description: Binary of the promo image. + responses: + '200': + description: Image successfully uploaded. URL to the uploaded image + content: + application/json: + schema: + type: string + + /enterprises/{enterprise_permalink}/logo.json: + delete: + description: Delete enterprise logo image. + tags: + - enterprises + parameters: + - in: path + name: enterprise_permalink + schema: + type: string + required: true + description: Permalink of the enterprise. + responses: + '200': + description: Image successfully deleted. Json object representing the enterprise + content: + application/json: + schema: + type: object + properties: + variant: + $ref: '#/components/schemas/Enterprise' + + /enterprises/{enterprise_permalink}/promo_image.json: + delete: + description: Delete enterprise promo image. + tags: + - enterprises + parameters: + - in: path + name: enterprise_permalink + schema: + type: string + required: true + description: Permalink of the enterprise. + responses: + '200': + description: Image successfully deleted. Json object representing the enterprise + content: + application/json: + schema: + type: object + properties: + variant: + $ref: '#/components/schemas/Enterprise' + /taxonomies: get: description: Gets all Taxonomies. @@ -605,7 +705,7 @@ paths: - taxonomies responses: '200': - description: successful operation + description: Successful operation. content: application/json: schema: @@ -1038,6 +1138,16 @@ components: owner_id: type: integer + EnterpriseShopfront: + type: object + properties: + id: + type: integer + name: + type: string + owner_id: + type: integer + Taxonomy: type: object properties: