diff --git a/Makefile b/Makefile index 541a765d4e3..9ea6418cbc3 100644 --- a/Makefile +++ b/Makefile @@ -185,7 +185,7 @@ package: package-python .PHONY: gen-api gen-api: docs/assets/js/swagger.yml ## Run the swagger code generator - $(GOGENERATE) ./pkg/api/apigen ./pkg/auth + $(GOGENERATE) ./pkg/api/apigen ./pkg/auth ./pkg/authentication .PHONY: gen-code gen-code: gen-api ## Run the generator for inline commands diff --git a/pkg/authentication/service.go b/pkg/authentication/service.go index 06118a5fa29..00e3fcab64c 100644 --- a/pkg/authentication/service.go +++ b/pkg/authentication/service.go @@ -1,5 +1,8 @@ package authentication +//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.5.6 -package apiclient -generate "types,client" -o apiclient/client.gen.go ../../api/authentication.yml +//go:generate go run github.com/golang/mock/mockgen@v1.6.0 -package=apiclient -destination=apiclient/mock_authentication_client.go github.com/treeverse/lakefs/pkg/authentication/apiclient ClientWithResponsesInterface + import ( "context" "fmt" @@ -11,8 +14,6 @@ import ( "github.com/treeverse/lakefs/pkg/logging" ) -//go:generate go run github.com/deepmap/oapi-codegen/cmd/oapi-codegen@v1.5.6 -package apiclient -generate "types,client" -o apiclient/client.gen.go ../../api/authentication.yml -//go:generate go run github.com/golang/mock/mockgen@v1.6.0 -package=apiclient -destination=apiclient/mock_authentication_client.go github.com/treeverse/lakefs/pkg/authentication/apiclient ClientWithResponsesInterface type Service interface { ValidateSTS(ctx context.Context, code, redirectURI, state string) (*STSResponseData, error) }