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

the basePath {{.}} not parsed when loading in browser #105

Open
abel-von opened this issue Dec 15, 2015 · 4 comments
Open

the basePath {{.}} not parsed when loading in browser #105

abel-von opened this issue Dec 15, 2015 · 4 comments

Comments

@abel-von
Copy link

When I use the newest version of yvasiyarov/swagger to generate docs.go. i find there is a new key "basePath" and the value is "{{.}}". but unfortunately the {{.}} is not parsed to a right path when the browser do a request. so the result is an error looks like
"Unable to read api 'v2' from path {{.}}/v2 (server returned undefined)"

@martsen
Copy link

martsen commented Dec 18, 2015

+1

@xiongtoto0526
Copy link

@martsen @abel-von , after hours of test, the fast way to avoid this trouble is ,just remove the "basePath={{.}}" feild in section "var resourceListingJson" (Notes: "basePath={{.}}" feild in section "var apiDescriptionsJson" should retain) of your docs.go generaterd by swagger ,and rerun the command "go run web.go docs.go". This works for me ,hope that helps you too. any way , hope author will fix it soon...

@james-robson
Copy link

+1, @xiongtoto0526 your fix works as a stop gap, thanks.

@mathewkbejoy
Copy link

shouldn't this also have a host?

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

No branches or pull requests

5 participants