question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

swagger Can not find package

See original GitHub issue

HI, I tried to use swagger in example package:

$ pwd
/Users/Kaign/Documents/projects/GO/src/github.com/yvasiyarov/swagger/example

$ swagger -apiPackage="example" -mainApiFile="./web/main.go"
2016/02/06 15:31:31 Start parsing
2016/02/06 15:31:31 Can not find package example 

What am I doing wrong?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
boonepcommented, Apr 27, 2016

Are you guys using vendoring? It looks like this project just checks the GOPATH. @yvasiyarov can we confirm this is abandoned? Thanks!

0reactions
dselanscommented, Nov 28, 2017

Resurrecting this issue as I’m cleaning things up – that’s correct, this project attempts to find the pkg in question in the following order:

  1. $GOPATH
  2. $GOROOT/src
  3. $GOROOT/src/pkg (go 1.4)

With a shortly upcoming PR (#137), the tool will also search for any dependency packages by looking for the pkg under $CWD/vendor/* and then $GOPATH/$mainPkg/vendor/$dependency_package.

So to make the example work, you’ll have to do something along the lines of: swagger -apiPackage="github.com/yvasiyarov/swagger/example" -mainApiFile=example/web/main.go -output=./API.md -format=markdown. Or in other words, specify the full pkg name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to find package 'Swashbuckle.AspNetCore.SwaggerUI ...
I'm using swagger, but I have this problem according to the documentation. The nuget package has not been downloaded successfully.
Read more >
SwaggerEditor - Swagger Documentation
Specifies the version of this app. The version is read from package.json file. Sample environment variable values can be found in .env file....
Read more >
Get started with Swashbuckle and ASP.NET Core
Right-click the project in Solution Explorer > Manage NuGet Packages · Set the Package source to "nuget.org" · Ensure the "Include prerelease" ...
Read more >
@nestjs/swagger - npm
A progressive Node.js framework for building efficient and scalable server-side applications. NPM Version Package License NPM Downloads CircleCI ...
Read more >
Swashbuckle.AspNetCore 6.4.0 - NuGet
Swagger tools for documenting APIs built on ASP.NET Core. ... NET CLI; Package Manager; PackageReference; Paket CLI ... dotnet add package Swashbuckle.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found