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

DEVDOCS-5966: [update] correct contentType #507

Merged
merged 16 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 8 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
10 changes: 9 additions & 1 deletion reference/catalog/brands_catalog.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ paths:
Only one image at a time can be created. To update a brand image, use the [Update a brand](/docs/rest-catalog/brands#update-a-brand) endpoint and an `image_url`.
operationId: createBrandImage
parameters:
- $ref: '#/components/parameters/ContentType'
- $ref: '#/components/parameters/MultipartContentType'
requestBody:
content:
multipart/form-data:
Expand Down Expand Up @@ -2658,6 +2658,14 @@ components:
schema:
type: string
default: 'application/json'
MultipartContentType:
name: Content-Type
in: header
required: true
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.'
schema:
type: string
default: 'mutipart/form-data'
responses:
Error:
description: ''
Expand Down
10 changes: 9 additions & 1 deletion reference/catalog/categories_catalog.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ paths:
To update a *Category Image*, use the [Update categories](/docs/rest-catalog/category-trees/categories#update-categories) endpoint and an `image_url`.
operationId: createCategoryImage
parameters:
- $ref: '#/components/parameters/ContentType'
- $ref: '#/components/parameters/MultipartContentType'
requestBody:
content:
multipart/form-data:
Expand Down Expand Up @@ -2710,6 +2710,14 @@ components:
schema:
type: string
default: 'application/json'
MultipartContentType:
name: Content-Type
in: header
required: true
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.'
schema:
type: string
default: 'mutipart/form-data'
ContentType:
name: Content-Type
in: header
Expand Down
10 changes: 9 additions & 1 deletion reference/catalog/product-modifiers_catalog.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ paths:
- image_file: Form posts are the only accepted upload option.
operationId: createProductModifierImage
parameters:
- $ref: '#/components/parameters/ContentType'
- $ref: '#/components/parameters/MultipartContentType'
requestBody:
content:
multipart/form-data:
Expand Down Expand Up @@ -2187,6 +2187,14 @@ components:
schema:
type: string
default: 'application/json'
MultipartContentType:
name: Content-Type
in: header
required: true
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.'
schema:
type: string
default: 'mutipart/form-data'
PageParam:
name: page
description: |
Expand Down
10 changes: 9 additions & 1 deletion reference/catalog/product-variants_catalog.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ paths:
- image_url: Any publicly available URL
operationId: createProductVariantImage
parameters:
- $ref: '#/components/parameters/ContentType'
- $ref: '#/components/parameters/MultipartContentType'
requestBody:
content:
application/json:
Expand Down Expand Up @@ -2991,6 +2991,14 @@ components:
schema:
type: string
default: 'application/json'
MultipartContentType:
name: Content-Type
in: header
required: true
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.'
schema:
type: string
default: 'mutipart/form-data'
PageParam:
name: page
description: |
Expand Down
18 changes: 16 additions & 2 deletions reference/catalog/products_catalog.v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1277,13 +1277,19 @@ paths:

**Usage Notes**
- `image_url` - `255` character limit
- For file uploads, use the `multipart/form-data` media type. See [Adding product images](/docs/store-operations/catalog#adding-product-images) for more information.
- `Content-Type` - For `image_file`, use the `multipart/form-data` media type. For `image_url`, use the application/json type. See [Adding product images](/docs/store-operations/catalog#adding-product-images) for more information.
bc-traciporter marked this conversation as resolved.
Show resolved Hide resolved
- You can create only one image at a time. A product can have up to 1000 images.
- Supported image file types are BMP, GIF, JPEG, PNG, WBMP, XBM, and WEBP.
- Each image file or image uploaded by URL can be up to 8 MB.
operationId: createProductImage
parameters:
- $ref: '#/components/parameters/ContentType'
- name: Content-Type
in: header
required: true
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.'
schema:
type: string
enum: [application/json, multipart/form-data]
requestBody:
content:
application/json:
Expand Down Expand Up @@ -8781,6 +8787,14 @@ components:
schema:
type: string
default: 'application/json'
MultipartContentType:
name: MultipartContent-Type
in: header
required: true
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.'
schema:
type: string
default: 'mutipart/form-data'
PageParam:
name: page
description: |
Expand Down
Loading