-
Notifications
You must be signed in to change notification settings - Fork 2
Contributing
A summary. The authoritative document is docs/contributing.md in the repo.
make build # builds CLI into ./bin/openapi-go-mcp
make test # go test ./...
make test-race # go test ./... -race -count=1
make vet # go vet ./...
make lint # golangci-lint run (config in .golangci.yml)
make fmt # gofmt -s -w .
make regen-examples # regenerates every example's oapi-codegen + mcp output
make smoke # boots petstore over stdio, calls initialize + tools/listRun a single test:
go test ./pkg/generator/ -run TestRender_OpenAICompat_PetstoreSchemas -vThe golden test in pkg/generator/golden_test.go guards generator output. When you change the generator and the diff is intentional:
UPDATE_GOLDEN=1 go test ./pkg/generator/...
git diff testdata/ # review carefully before committingIf you can't justify every byte of the diff, the change isn't ready.
-
Lint config (
.golangci.yml) enableserrcheck,govet,staticcheck,revive,gocritic,gosec.gocritic'sifElseChainis intentionally disabled. -
Imports —
goimportslocal-prefixesis set to the module path. Groups are: stdlib, third-party, then this module. -
Determinism is mandatory. Sorted iteration everywhere,
gofmtoutput, golden coverage. Reviews depend on this. -
Update
docs/changelog.mdunder## Unreleasedfor user-visible changes. -
Don't break the runtime interface lightly. Both backend adapters depend on it; new methods need both
gosdkandmark3labsimplementations.
- Unit tests live next to each package.
-
Golden tests live in
pkg/generator/, with fixtures intestdata/. -
E2E tests live in
tests/e2e/. They exercise example servers over MCP stdio and require examples to already be generated (make regen-examplesif you changed the generator).
CI runs on Go 1.26.x. Generated code itself targets Go 1.23+ — downstream users can still compile against older Go.
Portions of pkg/runtime and pkg/generator/naming.go are adapted from redpanda-data/protoc-gen-go-mcp under Apache 2.0. Keep the attribution comment intact when editing those files.
By contributing you agree to the Code of Conduct.
Don't open public issues for security problems. See docs/security.md for the disclosure process.
Repo · Releases · Issues · Discussions · Apache 2.0
Get started
Modes
Features
Deploy
Reference
Project