Skip to content

Commit b7ccbea

Browse files
authored
Fix localized-attributes samples (#3228)
1 parent 7e93a7f commit b7ccbea

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

Diff for: .code-samples.meilisearch.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -1360,11 +1360,9 @@ update_localized_attribute_settings_1: |-
13601360
curl \
13611361
-X PUT 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes' \
13621362
-H 'Content-Type: application/json' \
1363-
--data-binary '{
1364-
"localizedAttributes": [
1365-
{"locales": ["jpn"], "attributePatterns": ["*_ja"]}
1366-
]
1367-
}'
1363+
--data-binary '[
1364+
{"locales": ["jpn"], "attributePatterns": ["*_ja"]}
1365+
]'
13681366
reset_localized_attribute_settings_1: |-
13691367
curl \
13701368
-X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/localized-attributes'

Diff for: reference/api/settings.mdx

+9-13
Original file line numberDiff line numberDiff line change
@@ -899,11 +899,9 @@ Get the localized attributes settings of an index.
899899
##### Response: `200 OK`
900900

901901
```json
902-
{
903-
"localizedAttributes": [
904-
{"locales": ["jpn"], "attributePatterns": ["*_ja"]}
905-
]
906-
}
902+
[
903+
{"locales": ["jpn"], "attributePatterns": ["*_ja"]}
904+
]
907905
```
908906

909907
### Update localized attribute settings
@@ -921,14 +919,12 @@ Update the localized attributes settings of an index.
921919
#### Body
922920

923921
```
924-
{
925-
"localizedAttributes": [
926-
{
927-
"locales": [<String>, …],
928-
"attributePatterns": [<String>, …],
929-
}
930-
]
931-
}
922+
[
923+
{
924+
"locales": [<String>, …],
925+
"attributePatterns": [<String>, …],
926+
}
927+
]
932928
```
933929

934930
| Name | Type | Default value | Description |

0 commit comments

Comments
 (0)