Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Settings API - Specify handling of null values when patching settings #202

Merged
merged 2 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
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
12 changes: 8 additions & 4 deletions text/0117-typo-tolerance-setting-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,14 @@ See [Summarized `task` Object for `202 Accepted`](0060-tasks-api.md#summarized-t
- 🔴 Sending a different Content-Type than `application/json` returns an [invalid_content_type](0061-error-format-and-definitions.md#invalid_content_type) error.
- 🔴 Sending an empty payload returns a [missing_payload](0061-error-format-and-definitions.md#missing_payload) error.
- 🔴 Sending an invalid JSON payload returns a [malformed_payload](0061-error-format-and-definitions.md#malformed_payload) error.
- 🔴 Sending a value with a different type than `Boolean` for the `enabled` field returns an [bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value with a different type than `Array of String` for the `disableOnAttributes` field returns an [bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value with a different type than `Array of String` for the `disableOnWords` field returns an [bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value with a different type than `Integer` for `minWordSizeForTypos` object fields returns an [bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value different from `null` or with a different type than `Boolean` for the `enabled` field returns a
[bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value different from `null` or with a different type than `Array of String` for the `disableOnAttributes`
field returns a [bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value different from `null` or with a different type than `Array of String` for the `disableOnWords` field
returns a [bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value different from `null` or with a different type than `Integer` for `minWordSizeForTypos` object fields
returns a [bad_request](0061-error-format-and-definitions.md#bad_request) error.

###### 3.2.2.2.2.1. Async Errors

Expand Down
9 changes: 5 additions & 4 deletions text/0123-settings-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ Modify the settings of a Meilisearch index.
| `stopWords` | Array of String / `null` | false |
| `synonyms` | Object / `null` | false |
| `distinctAttribute` | String / `null` | false |
| `typoTolerance` | Object | false |
| `pagination` | Object | false |
| `faceting` | Object | false |
| `typoTolerance` | Object / `null` | false |
| `pagination` | Object / `null` | false |
| `faceting` | Object / `null` | false |

The request payload accepts partial definitions.
- The request payload accepts partial definitions, the value of missing fields will remain unchanged.
- The request payload accepts the `null` value for any setting, which will reset the setting to its default value.

##### 3.2.2.2. Response Definition

Expand Down
3 changes: 2 additions & 1 deletion text/157-faceting-setting-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ See [Summarized `task` Object for `202 Accepted`](0060-tasks-api.md#summarized-t
- 🔴 Sending a different Content-Type than `application/json` returns an [invalid_content_type](0061-error-format-and-definitions.md#invalid_content_type) error.
- 🔴 Sending an empty payload returns a [missing_payload](0061-error-format-and-definitions.md#missing_payload) error.
- 🔴 Sending an invalid JSON payload returns a [malformed_payload](0061-error-format-and-definitions.md#malformed_payload) error.
- 🔴 Sending a value with a different type than `Integer` for the `maxValuesPerFacet` field returns an [bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value different from `null` or with a different type than `Integer` for the `maxValuesPerFacet` field returns
a [bad_request](0061-error-format-and-definitions.md#bad_request) error.

###### 3.2.2.2.2.1. Async Errors

Expand Down
3 changes: 2 additions & 1 deletion text/157-pagination-setting-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ See [Summarized `task` Object for `202 Accepted`](0060-tasks-api.md#summarized-t
- 🔴 Sending a different Content-Type than `application/json` returns an [invalid_content_type](0061-error-format-and-definitions.md#invalid_content_type) error.
- 🔴 Sending an empty payload returns a [missing_payload](0061-error-format-and-definitions.md#missing_payload) error.
- 🔴 Sending an invalid JSON payload returns a [malformed_payload](0061-error-format-and-definitions.md#malformed_payload) error.
- 🔴 Sending a value with a different type than `Integer` for the `maxTotalHits` field returns an [bad_request](0061-error-format-and-definitions.md#bad_request) error.
- 🔴 Sending a value different from `null` or with a different type than `Integer` for the `maxTotalHits` field returns a
[bad_request](0061-error-format-and-definitions.md#bad_request) error.

###### 3.2.2.2.2.1. Async Errors

Expand Down