docs/generate/requirements.md
Golang is a powerful and enticing language, but it may sometimes confuse first time users.
Before engaging further with go-swagger, please take a while to get comfortable with golang basics
and conventions. That will save yourself much time and frustration.
Before generating code, you should make sure your target is going to properly resolve dependencies.
NOTE: generation uses extensively the
goimportstool and dependencies must be matched at code generation time.
If you have built go-swagger locally (e.g. from source), all dependencies are already installed.
The following required dependencies may be fetched by using go get:
github.com/go-openapi/errorsgithub.com/go-openapi/loadsgithub.com/go-openapi/runtimegithub.com/go-openapi/specgithub.com/go-openapi/strfmtgithub.com/go-openapi/swaggithub.com/go-openapi/validate{{< hint "info" >}} The code generation process ends with a message indicating the packages required for your generated code. {{< /hint >}}
There are some additional packages required by the (default) generated server. This depends on your generation options, a command line flags handling package:
Same as above.
The generated models only depend on:
github.com/go-openapi/errorsgithub.com/go-openapi/strfmtgithub.com/go-openapi/swaggithub.com/go-openapi/validateThe code that is scanned for spec generation must resolve all its dependencies (i.e. must build).