Skip to content
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

Cannot parse router comment "/ [get]" #599

Closed
lc-jordanfelix opened this issue Jan 6, 2020 · 5 comments · Fixed by #605
Closed

Cannot parse router comment "/ [get]" #599

lc-jordanfelix opened this issue Jan 6, 2020 · 5 comments · Fixed by #605
Labels

Comments

@lc-jordanfelix
Copy link

Describe the bug
Since upgrading to v1.6.4 from v1.6.3, some of our routes no longer parse. The problem routes are annotated like this

// @Router / [get]

We have an annotated base path for the set of routes. The problem routes are "/" off the base path.

To Reproduce
Steps to reproduce the behavior:

  1. Annotate a function with
// @Router / [get]
  1. run swaggo
  2. See error

Expected behavior
Route parses and generates as usual

Screenshots
Screen Shot 2020-01-06 at 1 14 48 PM

Your swag version
e.g. 1.6.4

Your go version
e.g. 1.13.5

@sdghchj
Copy link
Member

sdghchj commented Jan 6, 2020

yes, same as #561

@sdghchj
Copy link
Member

sdghchj commented Jan 6, 2020

This issue seems to be a result of a PR #552 on 10 Nov,2019

@lc-jordanfelix
Copy link
Author

We download the latest version for every deployment and we only just started having this issue yesterday, with no changes to the swaggo annotations.

See successful screenshot:
Screen Shot 2020-01-07 at 8 42 22 AM

Yesterday's deployment:
Screen Shot 2020-01-07 at 8 41 05 AM

@sdghchj
Copy link
Member

sdghchj commented Jan 9, 2020

how about this issue? whether to fix ? @easonlin404

@easonlin404
Copy link
Member

how about this issue? whether to fix ? @easonlin404

Sure, let me figure out what’s root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants