Skip to content

Commit

Permalink
Add authentication swagger generation to gen-api
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-har committed Mar 20, 2024
1 parent a361192 commit 925d62f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions pkg/authentication/service.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package authentication

//go:generate go run github.com/deepmap/oapi-codegen/cmd/[email protected] -package apiclient -generate "types,client" -o apiclient/client.gen.go ../../api/authentication.yml
//go:generate go run github.com/golang/mock/[email protected] -package=apiclient -destination=apiclient/mock_authentication_client.go github.com/treeverse/lakefs/pkg/authentication/apiclient ClientWithResponsesInterface

import (
"context"
"fmt"
Expand All @@ -11,8 +14,6 @@ import (
"github.com/treeverse/lakefs/pkg/logging"
)

//go:generate go run github.com/deepmap/oapi-codegen/cmd/[email protected] -package apiclient -generate "types,client" -o apiclient/client.gen.go ../../api/authentication.yml
//go:generate go run github.com/golang/mock/[email protected] -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)
}
Expand Down

0 comments on commit 925d62f

Please sign in to comment.