-
Notifications
You must be signed in to change notification settings - Fork 38
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 Echo router extractor and method parser. #17
base: master
Are you sure you want to change the base?
Conversation
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.
Hey! Thanks for the pull! I have some initial comments right off the bat but I'll review in more detail later today or tomorrow.
Cheers -
@@ -4,6 +4,9 @@ | |||
|
|||
Generate documentation for your REST/HTTP API from your Go unit tests - a simple addition to Go's testing package. | |||
|
|||
This fork adds `MakeEchoRouterExtractor` to extract query params from labstack.Echo server |
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.
Please delete these lines
@@ -1,4 +1,79 @@ | |||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
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.
go.sum got a bit out of control here! can you clean this up?
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.
oh my bad, i guess echo just imports a ton of external libraries huh.
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.
That's correct. Lots of useless dependencies. I'll try to "interfacerize" if you'd like that?
fn.Doc = strings.Replace(fn.Doc, "\t", " ", -1) | ||
funcsMap["("+fn.Recv+")"+fn.Name] = fn | ||
} | ||
} |
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.
I tested this locally and I get the same doc generated for a method handler with and without your code change.
Can you add an example in examples/widgets/* or foos/* to demonstrate that the change works?
@@ -0,0 +1,26 @@ | |||
package vars | |||
|
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.
I am hesitant to add this change because of the enormous amount of dependencies that echo brings in.
I would prefer to see this URL Var extractor added as documentation in the Readme.
No description provided.