-
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
Using Get atribute does not add documentation and does not give any error #1655
Comments
Not sure how the issue is related to reusing responses in To solve the issue of not being able to use |
Just that this example is from reusing responses. I was trying to write code with attributes by this example.
Maybe. I did not know where to even look at, it is confusing. So as I understand now - examples in swagger-php cookbook are not guaranteed to work when using nelmio api bundle. But now reading nelmio documentation: https://symfony.com/bundles/NelmioApiDocBundle/current/index.html#how-does-this-bundle-work
So it points me to swagger php github so probably thats why I expected them to work.
|
Example with annotations: https://zircote.github.io/swagger-php/guide/cookbook.html#reusing-responses
Based on the example I have made minimal code. Just added Areas attribute, because in my project without that tag it never shows up. And this does not show up anyway:
If I do this, it works:
So why it does not work as is in documentation? I assume the
@OA\Response(
is not necessary for minimal code. Get attribute by the source I see just extends Get annotation, so it should work. How to debug such cases when there is no error? Maybe I do not know some basics and so do not understand but I have read cookbook.Tried also create dump and when there is no route attribute, and is get instead - there is no such url in the dump.
bin/console nelmio:apidoc:dump > dump.json --area=public
The text was updated successfully, but these errors were encountered: