Skip to content

Commit 72b5f54

Browse files
committed
Switch from ungrouped_name to default_group
1 parent 6d81690 commit 72b5f54

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

config/apidoc.php

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
/*
66
* The output path for the generated documentation.
7+
* This path should be relative to the root of your application.
78
*/
89
'output' => 'public/docs',
910

@@ -168,42 +169,38 @@
168169
],
169170

170171
/*
171-
* Custom logo path. Will be copied during generate command. Set this to false to use the default logo.
172+
* Custom logo path. The logo will be copied from this location
173+
* during the generate process. Set this to false to use the default logo.
172174
*
173175
* Change to an absolute path to use your custom logo. For example:
174176
* 'logo' => resource_path('views') . '/api/logo.png'
175177
*
176178
* If you want to use this, please be aware of the following rules:
177-
* - size: 230 x 52
179+
* - the image size must be 230 x 52
178180
*/
179181
'logo' => false,
180182

181183
/*
182184
* Name for the group of routes which do not have a @group set.
183185
*/
184-
'ungrouped_name' => 'general',
186+
'default_group' => 'general',
185187

186188
/*
187189
* Configure how responses are transformed using @transformer and @transformerCollection
188190
* Requires league/fractal package: composer require league/fractal
189191
*
190-
* If you are using a custom serializer with league/fractal,
191-
* you can specify it here.
192-
*
193-
* Serializers included with league/fractal:
194-
* - \League\Fractal\Serializer\ArraySerializer::class
195-
* - \League\Fractal\Serializer\DataArraySerializer::class
196-
* - \League\Fractal\Serializer\JsonApiSerializer::class
197-
*
198-
* Leave as null to use no serializer or return a simple JSON.
199192
*/
200193
'fractal' => [
194+
/* If you are using a custom serializer with league/fractal,
195+
* you can specify it here.
196+
*
197+
* Serializers included with league/fractal:
198+
* - \League\Fractal\Serializer\ArraySerializer::class
199+
* - \League\Fractal\Serializer\DataArraySerializer::class
200+
* - \League\Fractal\Serializer\JsonApiSerializer::class
201+
*
202+
* Leave as null to use no serializer or return a simple JSON.
203+
*/
201204
'serializer' => null,
202205
],
203-
204-
/*
205-
* If you would like the package to generate the same example values for parameters on each run,
206-
* set this to any number (eg. 1234)
207-
*/
208-
'faker_seed' => null,
209206
];

src/Tools/Generator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,8 @@ protected function getRouteGroup(ReflectionClass $controller, ReflectionMethod $
296296
}
297297
}
298298

299-
return config('apidoc.ungrouped_name') ?: 'general';
299+
// TODO: get rid of ungrouped_name in next major release
300+
return config('apidoc.default_group', config('apidoc.ungrouped_name', 'general'));
300301
}
301302

302303
private function normalizeParameterType($type)

0 commit comments

Comments
 (0)