Skip to content

Commit

Permalink
chore(MOS-1718): Update documentation regarding article categories (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
fred-jan authored Aug 8, 2024
1 parent 4a42559 commit 85acc5a
Showing 1 changed file with 26 additions and 10 deletions.
36 changes: 26 additions & 10 deletions spec/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ paths:
content:
application/json:
schema:
$ref: "#/components/schemas/ArticleChangeable"
$ref: "#/components/schemas/ArticlePatchable"
description: Article with attributes to change
required: true
responses:
Expand Down Expand Up @@ -2201,8 +2201,8 @@ components:
type: string
Article:
required:
- categories
- name
- categories
example:
id: 123
uuid: "095be615-a8ad-4c33-8e9c-c7612fbf6c9f"
Expand Down Expand Up @@ -2309,7 +2309,7 @@ components:
type: array
items:
$ref: "#/components/schemas/ArticleVariant"
ArticleChangeable:
ArticlePatchable:
example:
name: Funny cushion
description: Endless fun
Expand All @@ -2335,6 +2335,10 @@ components:
- category_id: 748020
is_main: true
is_active: true
- category_id: 824312
article_url_id: 4005
is_main: false
is_active: true
lists:
- id: 293822
has_images: true
Expand All @@ -2359,6 +2363,10 @@ components:
allOf:
- $ref: "#/components/schemas/ArticlePostable"
- properties:
categories:
type: array
items:
$ref: "#/components/schemas/CategoryArticlePatchable"
variants:
type: array
items:
Expand Down Expand Up @@ -2413,7 +2421,7 @@ components:
categories:
type: array
items:
$ref: "#/components/schemas/CategoryArticle"
$ref: "#/components/schemas/CategoryArticlePostable"
lists:
type: array
items:
Expand Down Expand Up @@ -2752,24 +2760,32 @@ components:
sorting:
before: 78908
CategoryArticle:
properties:
position:
description: Relative position of the article on the page
type: integer
allOf:
- $ref: "#/components/schemas/CategoryArticlePatchable"
CategoryArticlePatchable:
properties:
article_url_id:
description: Unique ID of the article linked to this page
type: integer
allOf:
- $ref: "#/components/schemas/CategoryArticlePostable"
CategoryArticlePostable:
required:
- category_id
properties:
category_id:
description: Internal category id
type: integer
article_url_id:
description: Article page URL Id
type: integer
is_active:
description: Whether the article is visible in the store on this page
type: boolean
is_main:
description: Whether this is the primary category linked to the article
type: boolean
position:
description: Relative position of the article on the page
type: integer
CategorySorting:
description: Category sorting details
properties:
Expand Down

0 comments on commit 85acc5a

Please sign in to comment.