Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 37b100d

Browse files
authored
Merge pull request #4 from oapi-codegen/update-post-move
Update post move
2 parents af027b0 + 02cb0ad commit 37b100d

100 files changed

Lines changed: 495 additions & 518 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,34 +19,34 @@ lint: tools
1919
# run the root module explicitly, to prevent recursive calls by re-invoking `make ...` top-level
2020
$(GOBIN)/golangci-lint run ./...
2121
# then, for all child modules, use a module-managed `Makefile`
22-
GOBIN=$(GOBIN) ./scripts/foreach-module.sh lint
22+
git ls-files '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && env GOBIN=$(GOBIN) make lint'
2323

2424
lint-ci: tools
2525
# for the root module, explicitly run the step, to prevent recursive calls
2626
$(GOBIN)/golangci-lint run ./... --output.text.path=stdout --timeout=5m
2727
# then, for all child modules, use a module-managed `Makefile`
28-
GOBIN=$(GOBIN) ./scripts/foreach-module.sh lint-ci
28+
git ls-files '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && env GOBIN=$(GOBIN) make lint-ci'
2929

3030
generate:
3131
# for the root module, explicitly run the step, to prevent recursive calls
3232
go generate ./...
3333
# then, for all child modules, use a module-managed `Makefile`
34-
GOBIN=$(GOBIN) ./scripts/foreach-module.sh generate
34+
git ls-files '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && make generate'
3535

3636
test:
3737
# for the root module, explicitly run the step, to prevent recursive calls
3838
go test -cover ./...
3939
# then, for all child modules, use a module-managed `Makefile`
40-
GOBIN=$(GOBIN) ./scripts/foreach-module.sh test
40+
git ls-files '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && make test'
4141

4242
tidy:
4343
# for the root module, explicitly run the step, to prevent recursive calls
4444
go mod tidy
4545
# then, for all child modules, use a module-managed `Makefile`
46-
GOBIN=$(GOBIN) ./scripts/foreach-module.sh tidy
46+
git ls-files '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && make tidy'
4747

4848
tidy-ci:
4949
# for the root module, explicitly run the step, to prevent recursive calls
5050
tidied -verbose
5151
# then, for all child modules, use a module-managed `Makefile`
52-
GOBIN=$(GOBIN) ./scripts/foreach-module.sh tidy-ci
52+
git ls-files '**/*go.mod' -z | xargs -0 -I{} bash -xc 'cd $$(dirname {}) && make tidy-ci'

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,7 @@ We can see that this provides the best means to focus on the implementation of t
393393
- Single-file output
394394
- Support multiple OpenAPI files by having a package-per-OpenAPI file
395395
- Support of OpenAPI 3.0
396-
- OpenAPI 3.1 support is in experimental form, as a complete rewrite using [libopenapi](https://github.com/pb33f/libopenapi). Please look in the
397-
`./experimental` directory. This is potentially the future V3 of `oapi-codegen` and is functionally complete, just not deeply tested yet. Many OpenAPI 3.1
398-
features are supported, such as webhooks and callbacks.
396+
- OpenAPI 3.1 support is [awaiting upstream support](https://github.com/oapi-codegen/oapi-codegen/issues/373)
399397
- Note that this does not include OpenAPI 2.0 (aka Swagger)
400398
- Extract parameters from requests, to reduce work required by your implementation
401399
- Implicit `additionalProperties` are ignored by default ([more details](#additional-properties-additionalproperties))

experimental/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ runtime helper.
156156

157157
Go 1.24 is required, install like so:
158158

159-
go get -tool github.com/oapi-codegen/oapi-codegen/experimental/cmd/oapi-codegen@latest
159+
go get -tool github.com/oapi-codegen/oapi-codegen-exp/experimental/cmd/oapi-codegen@latest
160160

161161
You can then run the code generator
162162

163-
//go:generate go run github.com/oapi-codegen/oapi-codegen/experimental/cmd/oapi-codegen
163+
//go:generate go run github.com/oapi-codegen/oapi-codegen-exp/experimental/cmd/oapi-codegen
164164

experimental/cmd/oapi-codegen/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
"gopkg.in/yaml.v3"
1717

18-
"github.com/oapi-codegen/oapi-codegen/experimental/internal/codegen"
18+
"github.com/oapi-codegen/oapi-codegen-exp/experimental/internal/codegen"
1919
)
2020

2121
func main() {

experimental/examples/callback/client/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"sync"
1212
"sync/atomic"
1313

14-
treefarm "github.com/oapi-codegen/oapi-codegen/experimental/examples/callback"
14+
treefarm "github.com/oapi-codegen/oapi-codegen-exp/experimental/examples/callback"
1515
)
1616

1717
// trees and cities for our planting requests

experimental/examples/callback/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate go run github.com/oapi-codegen/oapi-codegen/experimental/cmd/oapi-codegen -config config.yaml tree-farm.yaml
1+
//go:generate go run github.com/oapi-codegen/oapi-codegen-exp/experimental/cmd/oapi-codegen -config config.yaml tree-farm.yaml
22

33
// Package treefarm provides an example of how to handle OpenAPI callbacks.
44
// We create a server which plants trees. The client asks the server to plant

experimental/examples/callback/server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
"github.com/google/uuid"
1414

15-
treefarm "github.com/oapi-codegen/oapi-codegen/experimental/examples/callback"
15+
treefarm "github.com/oapi-codegen/oapi-codegen-exp/experimental/examples/callback"
1616
)
1717

1818
// TreeFarm implements treefarm.ServerInterface.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
module github.com/oapi-codegen/oapi-codegen/experimental/examples/petstore-expanded/chi
1+
module github.com/oapi-codegen/oapi-codegen-exp/experimental/examples/petstore-expanded/chi
22

33
go 1.24.0
44

55
require (
66
github.com/go-chi/chi/v5 v5.2.2
77
github.com/google/uuid v1.6.0
8-
github.com/oapi-codegen/oapi-codegen/experimental v0.0.0
8+
github.com/oapi-codegen/oapi-codegen-exp/experimental v0.0.0
99
)
1010

11-
replace github.com/oapi-codegen/oapi-codegen/experimental => ../../../
11+
replace github.com/oapi-codegen/oapi-codegen-exp/experimental => ../../../

experimental/examples/petstore-expanded/chi/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"net/http"
1414

1515
"github.com/go-chi/chi/v5"
16-
"github.com/oapi-codegen/oapi-codegen/experimental/examples/petstore-expanded/chi/server"
16+
"github.com/oapi-codegen/oapi-codegen-exp/experimental/examples/petstore-expanded/chi/server"
1717
)
1818

1919
func main() {

experimental/examples/petstore-expanded/chi/server/petstore.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"net/http"
99
"sync"
1010

11-
petstore "github.com/oapi-codegen/oapi-codegen/experimental/examples/petstore-expanded"
11+
petstore "github.com/oapi-codegen/oapi-codegen-exp/experimental/examples/petstore-expanded"
1212
)
1313

1414
// PetStore implements the ServerInterface.

0 commit comments

Comments
 (0)