-
Notifications
You must be signed in to change notification settings - Fork 933
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
The 'items' field for Array property's isn't populated by the DocBlock #1340
Comments
Not sure if it's a bug, but it could be better, agreed. |
Yeah I also think that will be more cleaner way to do it, if we can do like below,
Currently below is the working example
|
That doesn't look like a valid PHP typehint to me, though? |
Yeah, you are right, but was looking for more cleaner way, wondering if we can do it. |
Could be done, but the type system overhaul is going very slow (sorry). /** @var array<SchemaLineChartsResource> $market */
public array $market; |
Just to keep things linked, I have a really similar issue generating documentation for As this issue didn't appear when searching the error on Google, I'm going to add the full detailed error here:
|
The following constructor:
Will throw the error:
@OA\Items() is required when @OA\Property() has type "array"
The fix is to manually populate the info, this works:
Is this a bug? Should the generator automatically populate the items info from the DocBlock generics?
The text was updated successfully, but these errors were encountered: