Skip to content
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

BodyParam's example is ignored when example array is empty #366

Closed
1 task done
hetzner opened this issue Nov 12, 2021 · 1 comment
Closed
1 task done

BodyParam's example is ignored when example array is empty #366

hetzner opened this issue Nov 12, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@hetzner
Copy link

hetzner commented Nov 12, 2021

What happened?

  1. I set my configuration to
@bodyParam myStatus object Description
@bodyParam myStatus.listOfValues string[] Description. Example: []
  1. Then I ran php artisan scribe:generate
  2. But I saw...

The parameter is not visible at all:

'myStatus' => [
],

instead of...

The example should show the empty array (because it's a valid value for that param)

'myStatus' => [
                'listOfValues' => [],
],

My environment:

  • PHP version (from php -v): 8.0.8
  • Framework (Laravel/Lumen): Laravel
  • Laravel/Lumen version (from composer show laravel/framework or composer show laravel/lumen-framework): v8.70.2
  • Scribe version (from composer show knuckleswtf/scribe): 3.15.0
@hetzner hetzner added the bug Something isn't working label Nov 12, 2021
@shalvah
Copy link
Contributor

shalvah commented Nov 16, 2021

Fixed in 3.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants