Skip to content

Commit

Permalink
minor #687 Fixing cart item definition (mamazu)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.0-dev branch.

Discussion
----------

Fixes #641 

Commits
-------

a8f6305 Fixing cart item definition
  • Loading branch information
mamazu authored Nov 14, 2020
2 parents 942e72f + a8f6305 commit 8fe5f49
Showing 1 changed file with 45 additions and 19 deletions.
64 changes: 45 additions & 19 deletions doc/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1326,47 +1326,73 @@ definitions:
type: "integer"
example: 1000
product:
$ref: "#/definitions/Product"
type: "object"
allOf:
- $ref: "#/definitions/ProductMinimal"
properties:
variants:
type: "array"
description: "This array only contains the variant the user has put into the cart"
items:
$ref: "#/definitions/Variant"
Product:
type: "object"
description: "Product with its basic information, variants, attributes, association and images."
allOf:
- $ref: "#/definitions/ProductMinimal"
properties:
code:
type: "string"
example: "LOGAN_MUG_CODE"
name:
type: "string"
example: "Logan Mug"
slug:
type: "string"
example: "logan-mug"
averageRating:
type: "string"
example: "4.5"
taxons:
$ref: "#/definitions/ProductTaxon"
variants:
description: "Keys reference to code of a variant."
type: "object"
additionalProperties:
type: "array"
items:
$ref: "#/definitions/Variant"
attributes:
type: "array"
items:
$ref: "#/definitions/Attribute"
associations:
description: "Keys reference to code of an association."
type: "object"
additionalProperties:
type: "array"
items:
$ref: "#/definitions/Product"
ProductMinimal:
type: "object"
description: "A miminal view of the product. Used for example for the cart."
properties:
code:
type: "string"
example: "LOGAN_MUG_CODE"
averageRating:
type: "string"
example: "1.8"
name:
type: "string"
example: "Logan Mug"
slug:
type: "string"
example: "logan-mug"
description:
type: "string"
example: "A very nice mug that you can drink from or use to store beverages in."
shortDescription:
type: "string"
example: "A mug."
metaKeywords:
type: "string"
example: "mug drink logan"
metaDescription:
type: "string"
example: "Some meta description"
images:
type: "array"
items:
$ref: "#/definitions/Image"
taxons:
$ref: "#/definitions/ProductTaxon"
attributes:
type: "array"
items:
$ref: "#/definitions/Attribute"
Image:
type: "object"
properties:
Expand Down

0 comments on commit 8fe5f49

Please sign in to comment.