-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix(API): declared array shape was not correct #1169
Conversation
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
/backport to stable0.7 |
This fix is not correct, it now requires a list with and two elements of int and mixed https://psalm.dev/r/74104d149c. You can also see that the generated spec is totally wrong and invalid. It should have been |
Thank you for your direct reply. You are right of course. The odd thing is, that OpenAPI will not build with the correct pairs of brackets:
a plain |
|
No, that was a test just for scientific reasons. |
It doesn't work because this is impossible in JSON. There is no way to index an object by non-strings, so it has to be a list or the keys need to be changed to strings. Since you cast to int later anyway, changing to string seems fine? |
fixes #1157