docs/contributing/getting-started.md
You only need a go compiler >= {{< param goswagger.goVersion >}}. You may develop on Linux, MacOS or Windows.
go-swaggermkdir -p $GOPATH/src/github.com/go-swagger
cd $GOPATH/src/github.com/go-swagger
git clone https://github.com/go-swagger/go-swagger
Building and installing go-swagger from source on your system:
go install github.com/go-swagger/go-swagger/cmd/swagger@latest
swagger version
dev
Building and installing go-swagger from your local clone:
cd $GOPATH/src/github.com/go-swagger
go install ./cmd/swagger
swagger version
dev
All PR's are welcome and generally accepted (so far, 95% were accepted...).
All PR's require a review by a team member.
These are just a few common sense rules to be followed.
* fixes #xxx in your commit body to automate issue closingWIP:git rebase -i master). Please make sure the resulting commit remains readable and
meaningful.git commit -s. PGP-signed commits with verified signatures are not mandatory (but much appreciated)go-swagger exposes a command line interface (CLI) to functionality largely built on top of
the go-openapi packages.
All these repos are go-gettable (i.e. available with the go get ./... command) and follow the standard go building and testing procedures.
Running standard unit tests:
go test ./...
Specifically for go-swagger, we run additional integration tests in CI. See Continuous Integration.
The diagram below displays a family picture of the go-openapi eco-system.
flowchart TD A((go-swagger))
B[go-openapi/runtime]
C[go-openapi/loads]
D[go-openapi/analysis]
E[go-openapi/validate]
F[go-openapi/spec]
G[go-openapi/jsonreference]
H[go-openapi/jsonpointer]
I[go-openapi/strfmt]
J[go-openapi/errors]
K[go-openapi/swag]
L[go-openapi/inflect]
A--> D
A--> J
A--> L
A--> B
A--> C
A--> F
A--> I
A--> J
A--> K
A--> E
B--> D
B--> J
B--> C
B--> F
B--> I
B--> K
B--> E
C--> D
C--> F
C--> K
D--> H
D--> F
D--> I
D--> J
D--> K
E--> D
E--> J
E--> H
E--> C
E--> F
E--> I
E--> K
F--> H
F--> G
F--> K
G--> H
H--> K
I--> J
{{< /mermaid >}}
We want to always support the two most recent minor versions of the go compiler.
However, we try to avoid introducing breaking changes, especially on the more
stable go-openapi repos.
When a deprecation or a change comes from the go language or the standard library, we handle this with build tags.
Notice the very important blank line after your build tag comment line.
Example (from go-openapi/swag):
//go:build !go1.8
package swag
import "net/url"
func pathUnescape(path string) (string, error) {
return url.QueryUnescape(path)
}