-
-
Notifications
You must be signed in to change notification settings - Fork 879
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
Using hashmaps produces invalid openapi schema #6800
Comments
@ostrolucky Have you tried with |
That's not accurate though, for us it's really a hashmap like so
hence needs to be reflected in php docblocks and openapi docs as such. Especially openapi docs because they are consumed by FE devs and for them it makes a big difference treating the prop as object or array. In places where we don't use hashmap but list, that's documented as |
Do you have phpstan/phpdoc-parser ? Can you try adding phpdocumentor/reflection-docblock ?
|
API Platform version(s) affected: 4.0.9
Description
How to reproduce
above produces schema like so
since "unknown_type" isn't actually recognized by OpenAPI, openapi schema validators will reject this kind of schema.
Instead, I would expect it generates schema like so
Possible Solution
Additional Context
The text was updated successfully, but these errors were encountered: