Skip to content

Commit

Permalink
chore: add test endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
katallaxie committed Jul 4, 2024
1 parent 680c5f5 commit 2738fd4
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 12 deletions.
14 changes: 14 additions & 0 deletions api/accounts/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ tags:
These are the account endpoints.
paths:
/accounts/:
get:
tags:
- Help
operationId: getHelp
summary: This is a test endpoint
description: |-
This endpoint is used to test the endpoint
responses:
'200':
description: Sucessful test
default:
description: Unexpected error

/accounts/{pubKey}:
get:
tags:
Expand Down
5 changes: 5 additions & 0 deletions internal/accounts/adapters/handlers/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ func NewAccountsHandler(ac controllers.AccountsController) *AccountsHandler {
return &AccountsHandler{ac}
}

// GetHelp ...
func (h *AccountsHandler) GetHelp(ctx context.Context, req openapi.GetHelpRequestObject) (openapi.GetHelpResponseObject, error) {
return openapi.GetHelp200Response{}, nil // this is a test endpoint
}

// GetToken ...
func (h *AccountsHandler) GetAccountToken(ctx context.Context, req openapi.GetAccountTokenRequestObject) (openapi.GetAccountTokenResponseObject, error) {
query := dto.FromGetAccountTokenRequest(req)
Expand Down
91 changes: 91 additions & 0 deletions pkg/apis/accounts/client.gen.go

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

25 changes: 13 additions & 12 deletions pkg/apis/accounts/models.gen.go

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

67 changes: 67 additions & 0 deletions pkg/apis/accounts/server.gen.go

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

0 comments on commit 2738fd4

Please sign in to comment.