Skip to content

Commit 9b294fc

Browse files
committed
- Removed examples from the docs
1 parent 6005160 commit 9b294fc

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/Concerns/ApiDocHelpers.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public static function apiDocGenerateFieldsMetadata(array $fields): array
208208
'type' => 'string[]',
209209
'description' => static::apiFieldsDescription(),
210210
'enumValues' => $fields,
211-
'example' => $fields,
211+
//'example' => $fields,
212212
];
213213
}
214214

@@ -231,7 +231,7 @@ public static function apiDocGenerateSortsMetadata(array $sorts, string $default
231231
'description' => static::apiSortsDescription() .
232232
'<br>**Default sort:** ' . ($default_sort ? '`' . $default_sort . '`' : 'None'),
233233
'enumValues' => $sorts,
234-
'example' => [$default_sort],
234+
//'example' => [$default_sort],
235235
];
236236
}
237237

@@ -254,7 +254,7 @@ public static function apiDocGenerateAppendsMetadata(array $appends): array
254254
'type' => 'string[]',
255255
'description' => static::apiAppendsDescription(),
256256
'enumValues' => $appends,
257-
'example' => $appends,
257+
//'example' => $appends,
258258
];
259259
}
260260

@@ -277,7 +277,7 @@ public static function apiDocGenerateIncludesMetadata(array $includes): array
277277
'type' => 'string[]',
278278
'description' => static::apiIncludesDescription(),
279279
'enumValues' => $includes,
280-
'example' => $includes,
280+
//'example' => $includes,
281281
];
282282
}
283283

@@ -289,7 +289,7 @@ public static function apiDocGeneratePerPageMetadata(): array
289289
(static::apiDocAllowUnlimitedResultsPerPage() ? '<br></br>To return all results, set `per_page` to `-1`' : '') .
290290
'<br>**Max per page:** ' . static::apiDocMaxPerPage() .
291291
'<br>**Default per page:** ' . static::apiDocDefaultPerPage(),
292-
'example' => static::apiDocDefaultPerPage(),
292+
//'example' => static::apiDocDefaultPerPage(),
293293
];
294294
}
295295

@@ -298,7 +298,7 @@ public static function apiDocGeneratePageMetadata(): array
298298
return [
299299
'type' => 'integer',
300300
'description' => 'For paginated results, which page to return.',
301-
'example' => 1,
301+
//'example' => 1,
302302
];
303303
}
304304

tests/Feature/ApiControllerTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ public function it_can_get_index_method_api_doc_query_params(): void
7777

7878
$this->assertIsArray($params);
7979

80-
$this->assertArrayHasKey('fields', $params);
81-
$this->assertArrayHasKey('include', $params);
82-
$this->assertArrayHasKey('append', $params);
83-
$this->assertArrayHasKey('sort', $params);
80+
$this->assertArrayHasKey('fields[]', $params);
81+
$this->assertArrayHasKey('include[]', $params);
82+
$this->assertArrayHasKey('append[]', $params);
83+
$this->assertArrayHasKey('sort[]', $params);
8484
$this->assertArrayHasKey('per_page', $params);
8585
$this->assertArrayHasKey('page', $params);
8686
$this->assertArrayHasKey('filter[name]', $params);
@@ -94,9 +94,9 @@ public function it_can_get_show_method_api_doc_query_params(): void
9494

9595
$this->assertIsArray($params);
9696

97-
$this->assertArrayHasKey('fields', $params);
98-
$this->assertArrayHasKey('include', $params);
99-
$this->assertArrayHasKey('append', $params);
97+
$this->assertArrayHasKey('fields[]', $params);
98+
$this->assertArrayHasKey('include[]', $params);
99+
$this->assertArrayHasKey('append[]', $params);
100100

101101
$this->assertArrayNotHasKey('sort', $params);
102102
$this->assertArrayNotHasKey('per_page', $params);

0 commit comments

Comments
 (0)