Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(MOS-1718): Update documentation regarding article categories #93

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading