@@ -58,7 +58,7 @@ class EndpointDeserializationTest {
5858 // ── FAQs ────────────────────────────────────────────────────────
5959
6060 @Test
61- fun `faqs by category deserializes paginated response with record_ fields` () =
61+ fun `faqs by category deserializes plain array with record_ fields` () =
6262 runTest {
6363 val result = api(FAQ_LIST_JSON ).faqsByCategory(1 )
6464 assertEquals(2 , result.size)
@@ -274,18 +274,12 @@ class EndpointDeserializationTest {
274274 }
275275 """
276276
277- // Paginated : faqs by category (record_* field names)
277+ // Plain array : faqs by category (record_* field names per v4.0 spec )
278278 const val FAQ_LIST_JSON = """
279- {
280- "success": true,
281- "data": [
282- {"record_id": 10, "category_id": 1, "record_title": "How do I install?", "record_preview": "Steps to install", "record_updated": "20240115120000", "record_lang": "en", "visits": 5},
283- {"record_id": 11, "category_id": 1, "record_title": "How do I configure?", "record_preview": "Configuration guide", "record_updated": "20240120120000", "record_lang": "en", "visits": 3}
284- ],
285- "meta": {
286- "pagination": {"total": 2, "count": 2, "per_page": 25, "current_page": 1, "total_pages": 1}
287- }
288- }
279+ [
280+ {"record_id": 10, "category_id": 1, "record_title": "How do I install?", "record_preview": "Steps to install", "record_updated": "20240115120000", "record_lang": "en", "visits": 5},
281+ {"record_id": 11, "category_id": 1, "record_title": "How do I configure?", "record_preview": "Configuration guide", "record_updated": "20240120120000", "record_lang": "en", "visits": 3}
282+ ]
289283 """
290284
291285 // Non-paginated: faq detail
0 commit comments