From 78d0a53c23c2b10c653a380ba36026fcb1d29416 Mon Sep 17 00:00:00 2001 From: Hassan Ahmed Date: Tue, 12 May 2026 13:04:12 +0200 Subject: [PATCH 1/2] test(locales): [SCM-1433] update Java test for q param in localesList - Add q parameter to localesList API call in LocalesApiTest - Align test signature with updated locales list endpoint --- .../test/java/com/phrase/client/api/LocalesApiTest.java | 3 ++- doc/compiled.json | 9 +++++++++ paths/locales/index.yaml | 6 ++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/clients/java/src/test/java/com/phrase/client/api/LocalesApiTest.java b/clients/java/src/test/java/com/phrase/client/api/LocalesApiTest.java index 6a39b4c94..dfa51f0f3 100644 --- a/clients/java/src/test/java/com/phrase/client/api/LocalesApiTest.java +++ b/clients/java/src/test/java/com/phrase/client/api/LocalesApiTest.java @@ -251,7 +251,8 @@ public void localesListTest() throws ApiException, InterruptedException { Integer perPage = null; String sortBy = null; String branch = "MY_BRANCH"; - List response = api.localesList(projectId, xPhraseAppOTP, page, perPage, sortBy, branch); + String q = null; + List response = api.localesList(projectId, xPhraseAppOTP, page, perPage, sortBy, branch, q); Assert.assertEquals("Correct number of elements", response.size(), 3); Assert.assertEquals("Correct locale name", response.get(0).getName(), "de-DE"); diff --git a/doc/compiled.json b/doc/compiled.json index 9652d66d9..bda687c2e 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -8355,6 +8355,15 @@ "schema": { "type": "string" } + }, + { + "description": "Specify a query to filter locales by name.", + "example": "name:en", + "name": "q", + "in": "query", + "schema": { + "type": "string" + } } ], "responses": { diff --git a/paths/locales/index.yaml b/paths/locales/index.yaml index 085546908..31ccacc6e 100644 --- a/paths/locales/index.yaml +++ b/paths/locales/index.yaml @@ -21,6 +21,12 @@ parameters: in: query schema: type: string +- description: Specify a query to filter locales by name. + example: name:en + name: q + in: query + schema: + type: string responses: '200': description: OK From 978a2def18e6da5c041b763efb5e595729a07150 Mon Sep 17 00:00:00 2001 From: Hassan Ahmed Date: Fri, 15 May 2026 15:40:23 +0200 Subject: [PATCH 2/2] docs(locales): clarify q param description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address PR review feedback — describe the q parameter's argument syntax and prefix-match semantics rather than just "filter by name". Co-Authored-By: Claude Sonnet 4.6 (1M context) --- doc/compiled.json | 2 +- paths/locales/index.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/compiled.json b/doc/compiled.json index bda687c2e..f778ce6a9 100644 --- a/doc/compiled.json +++ b/doc/compiled.json @@ -8357,7 +8357,7 @@ } }, { - "description": "Specify a query to filter locales by name.", + "description": "Specify a query to filter locales. Currently supports `name` argument, filtering only locales with names starting with the given string.", "example": "name:en", "name": "q", "in": "query", diff --git a/paths/locales/index.yaml b/paths/locales/index.yaml index 31ccacc6e..1430a9fc5 100644 --- a/paths/locales/index.yaml +++ b/paths/locales/index.yaml @@ -21,7 +21,7 @@ parameters: in: query schema: type: string -- description: Specify a query to filter locales by name. +- description: Specify a query to filter locales. Currently supports `name` argument, filtering only locales with names starting with the given string. example: name:en name: q in: query