-
-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
array to string conversion #455
Labels
bug
Something isn't working
Comments
I'm facing a similar problem, so I'll add some information. Points:
Case 1.routes/api.php: /**
* ?param[id][0]=1
* @queryParam param object
* @queryParam param.id integer[] required
*/
Route::get("/test", function () {
return "Test";
}); Then
Case 2.routes/api.php: /**
* ?param[0][id]=1
* @queryParam param object[]
* @queryParam param.*.id integer required
*/
Route::get("/test", function () {
return "Test";
}); Then
My environment:
My Scribe config (minus the comments): <?php
use Knuckles\Scribe\Extracting\Strategies;
return [
'theme' => 'default',
'title' => null,
'description' => '',
'base_url' => null,
'routes' => [
[
'match' => [
'prefixes' => ['api/*'],
'domains' => ['*'],
'versions' => ['v1'],
],
'include' => [
],
'exclude' => [
],
'apply' => [
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'response_calls' => [
'methods' => ['GET'],
'config' => [
'app.env' => 'documentation',
],
'queryParams' => [
],
'bodyParams' => [
],
'fileParams' => [
],
'cookies' => [
],
],
],
],
],
'type' => 'static',
'static' => [
'output_path' => 'public/docs',
],
'laravel' => [
'add_routes' => true,
'docs_url' => '/docs',
'middleware' => [],
],
'try_it_out' => [
'enabled' => true,
'base_url' => null,
'use_csrf' => false,
'csrf_url' => '/sanctum/csrf-cookie',
],
'auth' => [
'enabled' => false,
'default' => false,
'in' => 'bearer',
'name' => 'key',
'use_value' => env('SCRIBE_AUTH_KEY'),
'placeholder' => '{YOUR_AUTH_KEY}',
'extra_info' => 'You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.',
],
'intro_text' => "",
'example_languages' => [
"php",
// 'bash',
// 'javascript',
],
'postman' => [
'enabled' => true,
'overrides' => [
],
],
'openapi' => [
'enabled' => true,
'overrides' => [
],
],
'default_group' => 'Endpoints',
'logo' => false,
'faker_seed' => null,
'strategies' => [
'metadata' => [
Strategies\Metadata\GetFromDocBlocks::class,
],
'urlParameters' => [
Strategies\UrlParameters\GetFromLaravelAPI::class,
Strategies\UrlParameters\GetFromLumenAPI::class,
Strategies\UrlParameters\GetFromUrlParamTag::class,
],
'queryParameters' => [
Strategies\QueryParameters\GetFromFormRequest::class,
Strategies\QueryParameters\GetFromInlineValidator::class,
Strategies\QueryParameters\GetFromQueryParamTag::class,
],
'headers' => [
Strategies\Headers\GetFromRouteRules::class,
Strategies\Headers\GetFromHeaderTag::class,
],
'bodyParameters' => [
Strategies\BodyParameters\GetFromFormRequest::class,
Strategies\BodyParameters\GetFromInlineValidator::class,
Strategies\BodyParameters\GetFromBodyParamTag::class,
],
'responses' => [
Strategies\Responses\UseTransformerTags::class,
Strategies\Responses\UseApiResourceTags::class,
Strategies\Responses\UseResponseTag::class,
Strategies\Responses\UseResponseFileTag::class,
Strategies\Responses\ResponseCalls::class,
],
'responseFields' => [
Strategies\ResponseFields\GetFromResponseFieldTag::class,
],
],
'fractal' => [
'serializer' => null,
],
'routeMatcher' => \Knuckles\Scribe\Matching\RouteMatcher::class,
'database_connections_to_transact' => [config('database.default')]
]; |
Sorry💦 maybe the problem mentioned in my reply is a duplicate of issue #308 |
This should be fixed by #603. Let me know if it's still an issue. |
Hi @shalvah |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when adding nested array it fails in generating the docs and gives the error below ,
it fails because of the filter.categories_ids and filter.brands_ids are arrays
The text was updated successfully, but these errors were encountered: