Skip to content

Commit

Permalink
generator: Improve the HTTP-server generator
Browse files Browse the repository at this point in the history
Do not generate deprecated `NewHTTPRouterWithOAS` any more.
  • Loading branch information
RussellLuo committed Mar 15, 2022
1 parent 3d8c5a8 commit ab5bada
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 26 deletions.
4 changes: 0 additions & 4 deletions examples/fileupload/http.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions examples/helloworld/http.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/helloworldgrpc/pb/helloworldgrpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions examples/messaging/http.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions examples/profilesvc/http.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/profilesvcgrpc/pb/profilesvcgrpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions examples/usersvc/http.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions gen/http/chi/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ func NewHTTPRouter(svc {{$.Data.SrcPkgQualifier}}{{$.Data.InterfaceName}}, codec
return r
}
func NewHTTPRouterWithOAS(svc {{$.Data.SrcPkgQualifier}}{{$.Data.InterfaceName}}, codecs httpcodec.Codecs, schema oas2.Schema) chi.Router {
return NewHTTPRouter(svc, codecs, httpoption.ResponseSchema(schema))
}
{{- range .Spec.Operations}}
{{- $nonCtxParams := nonCtxParams .Request.Params}}
Expand Down

0 comments on commit ab5bada

Please sign in to comment.