-
Notifications
You must be signed in to change notification settings - Fork 938
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
Add augmentation for operations #293
Conversation
@@ -13,7 +13,7 @@ class UtilTest extends SwaggerTestCase | |||
|
|||
public function testExclude() | |||
{ | |||
$swagger = \Swagger\scan(__DIR__ . '/Fixtures', ['exclude' => ['Customer.php', 'UsingRefs.php', 'GrandParent.php']]); | |||
$swagger = \Swagger\scan(__DIR__ . '/Fixtures', ['exclude' => ['Customer.php', 'UsingRefs.php', 'UsingPhpDoc', 'GrandParent.php']]); |
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.
missing a .php? :)
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.
hm, true :) it worked anyway but I fixed it now.
This will extract the summary and description for operations from the phpdoc method description.
Does anything speak against merging this? |
I'd like it if the splitting of the description and summary was moved to the AugmentOperations or Util class, but didn't make the time to do that yet. |
That's a good idea, I moved the splitting of the description to AugmentOperations. What do you think? |
Merged as 2eec9f1 i've updated Context->extractDescription() to include linebreaks and updated AugmentOperations accordingly, i've also made the blankline between a summary and a description a requirement. Let me know if you disagree with the changes i've made. and thanks the pull request! |
Interresting read, even specifies the rules for the destinction between summary and description. and it's github flavored markdown which converts single line breaks to I'm not sure what to do for the |
21a9615
to
a51f62c
Compare
Moved summary / description logic back to the Context as it applies to all phpdoc comments not just the AugmentOperation. Also implemented the splitting by the "line ending with a |
Cool, looks good. I'll close this pull request then. |
- Beter validation of type="file" #305 - Augment Operations summary and description based on the comment. #293 - Bugfixes #300 - Add support for xml (and externalDocs and properties) inside a @swg\Items. #279 - Nested properties are no longer injected into the Definition #297 - Fixed nesting issue with verbose property notation #297
This will extract the summary and description for operations from the
phpdoc method description.