Просмотр исходного кода

✅ (api-test): terms 查询用例改用具名参数 per_page

客户端重新生成后 getApiV3Terms 的第二个参数变成 with_body,
位置参数 5 被当成 with_body=5,返回 422。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
visuddhinanda 12 часов назад
Родитель
Сommit
95091b6326
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      api-test/cases/16_terms.php

+ 1 - 1
api-test/cases/16_terms.php

@@ -13,7 +13,7 @@ use \WikipaliApi\Model\PostApiV3StudiosStudioChannelsRequest;
  */
 
 test('GET /v3/terms?word= → 200;缺 word → 422', function () {
-    $res = request(fn () => api(TermsApi::class)->getApiV3TermsWithHttpInfo('dhamma', 5));
+    $res = request(fn () => api(TermsApi::class)->getApiV3TermsWithHttpInfo('dhamma', per_page: 5));
     assert_status(200, $res, 'terms lookup');
     assert_has_key('meta', $res['body'], 'terms lookup');