Skip to content

Commit

Permalink
Adding the new docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mamazu committed Apr 5, 2019
1 parent f10503b commit 728e41a
Showing 1 changed file with 210 additions and 6 deletions.
216 changes: 210 additions & 6 deletions doc/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ paths:
security:
- {}
- bearerAuth: []
/{channelCode}/taxon-products-by-slug/{slug}:
/{channelCode}/taxon-products/by-slug/{slug}:
parameters:
- $ref: "#/parameters/ChannelCode"
get:
Expand Down Expand Up @@ -487,7 +487,43 @@ paths:
description: "Paginated product list."
schema:
$ref: "#/definitions/ProductsPage"
/{channelCode}/taxon-products/{code}:
/{channelCode}/taxon-products-by-slug/{slug}:
parameters:
- $ref: "#/parameters/ChannelCode"
get:
deprecated: true
tags:
- "products"
summary: "Show product catalog."
description: "This endpoint will return a paginated list of products for given taxon."
operationId: "productCatalogBySlug_deprecated"
parameters:
- name: "slug"
in: "path"
description: "Slug of taxonomy for which products should be listed."
required: true
type: "string"
- name: "locale"
in: "query"
description: "Locale in which products should be shown."
required: false
type: "string"
- name: "limit"
in: "query"
description: "Number of expected products per page."
required: false
type: "integer"
- name: "page"
in: "query"
description: "Page number."
required: false
type: "integer"
responses:
200:
description: "Paginated product list."
schema:
$ref: "#/definitions/ProductsPage"
/{channelCode}/taxon-products/by-code/{code}:
parameters:
- $ref: "#/parameters/ChannelCode"
get:
Expand Down Expand Up @@ -522,7 +558,43 @@ paths:
description: "Paginated product list."
schema:
$ref: "#/definitions/ProductsPage"
/{channelCode}/products-by-slug/{slug}:
/{channelCode}/taxon-products/{code}:
parameters:
- $ref: "#/parameters/ChannelCode"
get:
deprecated: true
tags:
- "products"
summary: "Show product catalog."
description: "This endpoint will return a paginated list of products for given taxon."
operationId: "productCatalog_deprecated"
parameters:
- name: "code"
in: "path"
description: "Code of taxonomy for which products should be listed."
required: true
type: "string"
- name: "locale"
in: "query"
description: "Locale in which products should be shown."
required: false
type: "string"
- name: "limit"
in: "query"
description: "Number of expected products per page."
required: false
type: "integer"
- name: "page"
in: "query"
description: "Page number."
required: false
type: "integer"
responses:
200:
description: "Paginated product list."
schema:
$ref: "#/definitions/ProductsPage"
/{channelCode}/products/by-slug/{slug}:
parameters:
- $ref: "#/parameters/ChannelCode"
get:
Expand All @@ -547,7 +619,33 @@ paths:
description: "Show a product with the given slug."
schema:
$ref: "#/definitions/ProductDetails"
/{channelCode}/products/{code}:
/{channelCode}/products-by-slug/{slug}:
parameters:
- $ref: "#/parameters/ChannelCode"
get:
deprecated: true
tags:
- "products"
summary: "Show a product with the given slug."
description: "This endpoint will return a product with the given slug."
operationId: "productDetailsBySlug_deprecated"
parameters:
- name: "slug"
in: "path"
description: "Slug of expected product."
required: true
type: "string"
- name: "locale"
in: "query"
description: "Locale in which products should be shown."
required: false
type: "string"
responses:
200:
description: "Show a product with the given slug."
schema:
$ref: "#/definitions/ProductDetails"
/{channelCode}/products/by-code/{code}:
parameters:
- $ref: "#/parameters/ChannelCode"
get:
Expand All @@ -572,7 +670,33 @@ paths:
description: "Show a product with the given code."
schema:
$ref: "#/definitions/ProductDetails"
/{channelCode}/product-reviews-by-slug/{slug}:
/{channelCode}/products/{code}:
parameters:
- $ref: "#/parameters/ChannelCode"
get:
deprecated: true
tags:
- "products"
summary: "Show a product with the given code."
description: "This endpoint will return a product with the given code."
operationId: "productDetails_deprecated"
parameters:
- name: "code"
in: "path"
description: "Code of expected product."
required: true
type: "string"
- name: "locale"
in: "query"
description: "Locale in which products should be shown."
required: false
type: "string"
responses:
200:
description: "Show a product with the given code."
schema:
$ref: "#/definitions/ProductDetails"
/{channelCode}/product/by-slug/{slug}/reviews:
parameters:
- $ref: "#/parameters/ChannelCode"
- name: "slug"
Expand Down Expand Up @@ -610,7 +734,47 @@ paths:
description: "A paginated list of all reviews related to the product identified by slug."
schema:
$ref: "#/definitions/ProductReviewsPage"
/{channelCode}/product/{code}/reviews:
/{channelCode}/product-reviews-by-slug/{slug}:
parameters:
- $ref: "#/parameters/ChannelCode"
- name: "slug"
in: "path"
description: "Slug of expected product."
required: true
type: "string"
post:
deprecated: true
tags:
- "products"
summary: "Add a review to the product."
description: "This endpoint will allow you to add a new review to the product. Remember, that it should be accepted by an administrator before it will be available in the review list."
operationId: "productAddReviewBySlug_deprecated"
parameters:
- in: "body"
name: "content"
required: true
schema:
$ref: "#/definitions/AddReviewRequest"
responses:
201:
description: "Review has been added to the product."
400:
description: "Invalid input, validation failed."
schema:
$ref: "#/definitions/GeneralError"
get:
deprecated: true
tags:
- "products"
summary: "Show reviews."
description: "This endpoint will return a paginated list of all reviews related to the product identified by slug."
operationId: "productReviewsBySlug_deprecated"
responses:
200:
description: "A paginated list of all reviews related to the product identified by slug."
schema:
$ref: "#/definitions/ProductReviewsPage"
/{channelCode}/product/by-code/{code}/reviews:
parameters:
- $ref: "#/parameters/ChannelCode"
- name: "code"
Expand Down Expand Up @@ -648,6 +812,46 @@ paths:
description: "A paginated list of all reviews related to the product identified by slug."
schema:
$ref: "#/definitions/ProductReviewsPage"
/{channelCode}/product/{code}/reviews:
parameters:
- $ref: "#/parameters/ChannelCode"
- name: "code"
in: "path"
description: "Code of expected product."
required: true
type: "string"
post:
deprecated: true
tags:
- "products"
summary: "Add a review to the product."
description: "This endpoint will allow you to add a new review to the product. Remember, that it should be accepted by an administrator before it will be available in the review list."
operationId: "productAddReview_deprecated"
parameters:
- in: "body"
name: "content"
required: true
schema:
$ref: "#/definitions/AddReviewRequest"
responses:
201:
description: "Review has been added to the product."
400:
description: "Invalid input, validation failed."
schema:
$ref: "#/definitions/GeneralError"
get:
deprecated: true
tags:
- "products"
summary: "Show reviews."
description: "This endpoint will return a paginated list of all reviews related to the product identified by slug."
operationId: "productReviews_deprecated"
responses:
200:
description: "A paginated list of all reviews related to the product identified by slug."
schema:
$ref: "#/definitions/ProductReviewsPage"
/{channelCode}/taxons:
parameters:
- $ref: "#/parameters/ChannelCode"
Expand Down

0 comments on commit 728e41a

Please sign in to comment.