-
Notifications
You must be signed in to change notification settings - Fork 948
adding attribute examples #1699
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
adding attribute examples #1699
Conversation
DerManoMann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff! Could you just please rename the files to something more meaningful? For example server_xx.php
|
@DerManoMann
Please let me know if my understanding is incorrect. 🙏 |
|
My bad - yes, this is fine. |
|
I think it would be good to add a script to validate that the snippets do evaluate to the same spec... I can look into that at some point. |
|
One think I noticed is that the attribute examples use double quotes for string. Code style here is to use single quotes unless there is actual need to use double. Might be a pain, biut probbly good to get in. I think IDE can help with that. |
|
Hi, @DerManoMann For example, an error on file_upload_with_headers_at.php: The
However, neigher apprach seems particulary good. Do you have any better ideas? |
|
@natsuki-engr I did push a fix to I guess you can still put in explicit ids where it makes sense, but for the purpose of this test they are not that relevant IMO. Nice work, btw. |
7185ac9 to
e04d06b
Compare
DerManoMann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few places where use OpenApi\Annotations as OA; is missing - would be great to get those added.
Another thing is that we now should add the docs/snippet folder to CS - for that you'd need to update .php-cs-fixer.dist.php to add the folder; something like this:
// ...
$finder = PhpCsFixer\Finder::create()
->path('src')->name('*.php')
->path('tools')->name('*.php')
->path('docs/examples')->name('*.php')
->path('docs/snippets')->name('*.php')
->path('tests')->name('*.php')Other than that it looks great. Thanks for taking the time.
|
@DerManoMann I apologize for the missing many use statements. I've added them, please check it again. |
|
No problem. Any help is appreciated and improving the docs is always valuable. |
|
@natsuki-engr Deployed and looking real nice! As a side note I noticed some examples have corresponding YAML - it wonder if adding a new tab for the generated spec would work ... |
Uh oh!
There was an error while loading. Please reload this page.