Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(fix): format swagger doc description for pubkey-lookup #68

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const docTemplate = `{
},
"/v1/staker/pubkey-lookup": {
"get": {
"description": "Retrieves public keys for the given BTC addresses. This endpoint",
"description": "Retrieves public keys for the given BTC addresses.\nThis endpoint only returns public keys for addresses that have associated delegations in the system.\nIf an address has no associated delegation, it will not be included in the response. Supports both Taproot and Native Segwit addresses.",
"produces": [
"application/json"
],
Expand Down
2 changes: 1 addition & 1 deletion docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
},
"/v1/staker/pubkey-lookup": {
"get": {
"description": "Retrieves public keys for the given BTC addresses. This endpoint",
"description": "Retrieves public keys for the given BTC addresses.\nThis endpoint only returns public keys for addresses that have associated delegations in the system.\nIf an address has no associated delegation, it will not be included in the response. Supports both Taproot and Native Segwit addresses.",
"produces": [
"application/json"
],
Expand Down
5 changes: 4 additions & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,10 @@ paths:
$ref: '#/definitions/github_com_babylonlabs-io_staking-api-service_internal_types.Error'
/v1/staker/pubkey-lookup:
get:
description: Retrieves public keys for the given BTC addresses. This endpoint
description: |-
Retrieves public keys for the given BTC addresses.
This endpoint only returns public keys for addresses that have associated delegations in the system.
If an address has no associated delegation, it will not be included in the response. Supports both Taproot and Native Segwit addresses.
parameters:
- collectionFormat: multi
description: List of BTC addresses to look up (up to 10), currently only supports
Expand Down
7 changes: 3 additions & 4 deletions internal/api/handlers/pubkey.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ const (
)

// GetPubKeys @Summary Get stakers' public keys
// @Description Retrieves public keys for the given BTC addresses. This endpoint
// only returns public keys for addresses that have associated delegations in
// the system. If an address has no associated delegation, it will not be
// included in the response. Supports both Taproot and Native Segwit addresses.
// @Description Retrieves public keys for the given BTC addresses.
// @Description This endpoint only returns public keys for addresses that have associated delegations in the system.
// @Description If an address has no associated delegation, it will not be included in the response. Supports both Taproot and Native Segwit addresses.
// @Produce json
// @Param address query []string true "List of BTC addresses to look up (up to 10), currently only supports Taproot and Native Segwit addresses" collectionFormat(multi)
// @Success 200 {object} Result[map[string]string] "A map of BTC addresses to their corresponding public keys (only addresses with delegations are returned)"
Expand Down