Skip to content

Commit

Permalink
fix: timestamp shall return as iso format (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrwbabylonlab authored Dec 5, 2024
1 parent b4c9b7d commit b6a296b
Show file tree
Hide file tree
Showing 10 changed files with 1,706 additions and 163 deletions.
84 changes: 45 additions & 39 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ const docTemplate = `{
"200": {
"description": "Staker delegation",
"schema": {
"$ref": "#/definitions/handler.PublicResponse-v2service_StakerDelegationPublic"
"$ref": "#/definitions/handler.PublicResponse-v2service_DelegationPublic"
}
},
"400": {
Expand Down Expand Up @@ -475,7 +475,7 @@ const docTemplate = `{
"200": {
"description": "List of staker delegations and pagination token",
"schema": {
"$ref": "#/definitions/handler.PublicResponse-array_v2service_StakerDelegationPublic"
"$ref": "#/definitions/handler.PublicResponse-array_v2service_DelegationPublic"
}
},
"400": {
Expand Down Expand Up @@ -690,27 +690,27 @@ const docTemplate = `{
}
}
},
"handler.PublicResponse-array_v2service_FinalityProviderStatsPublic": {
"handler.PublicResponse-array_v2service_DelegationPublic": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/v2service.FinalityProviderStatsPublic"
"$ref": "#/definitions/v2service.DelegationPublic"
}
},
"pagination": {
"$ref": "#/definitions/handler.paginationResponse"
}
}
},
"handler.PublicResponse-array_v2service_StakerDelegationPublic": {
"handler.PublicResponse-array_v2service_FinalityProviderStatsPublic": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/v2service.StakerDelegationPublic"
"$ref": "#/definitions/v2service.FinalityProviderStatsPublic"
}
},
"pagination": {
Expand Down Expand Up @@ -751,22 +751,22 @@ const docTemplate = `{
}
}
},
"handler.PublicResponse-v2service_OverallStatsPublic": {
"handler.PublicResponse-v2service_DelegationPublic": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/v2service.OverallStatsPublic"
"$ref": "#/definitions/v2service.DelegationPublic"
},
"pagination": {
"$ref": "#/definitions/handler.paginationResponse"
}
}
},
"handler.PublicResponse-v2service_StakerDelegationPublic": {
"handler.PublicResponse-v2service_OverallStatsPublic": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/v2service.StakerDelegationPublic"
"$ref": "#/definitions/v2service.OverallStatsPublic"
},
"pagination": {
"$ref": "#/definitions/handler.paginationResponse"
Expand Down Expand Up @@ -1164,14 +1164,40 @@ const docTemplate = `{
}
}
},
"v2service.DelegationPublic": {
"type": "object",
"properties": {
"delegation_staking": {
"$ref": "#/definitions/v2service.DelegationStaking"
},
"delegation_unbonding": {
"$ref": "#/definitions/v2service.DelegationUnbonding"
},
"finality_provider_btc_pks_hex": {
"type": "array",
"items": {
"type": "string"
}
},
"params_version": {
"type": "integer"
},
"staker_btc_pk_hex": {
"type": "string"
},
"state": {
"$ref": "#/definitions/v2types.DelegationState"
}
}
},
"v2service.DelegationStaking": {
"type": "object",
"properties": {
"bbn_inception_height": {
"type": "integer"
},
"bbn_inception_time": {
"type": "integer"
"type": "string"
},
"end_height": {
"type": "integer"
Expand All @@ -1183,7 +1209,7 @@ const docTemplate = `{
"type": "integer"
},
"staking_time": {
"type": "integer"
"type": "string"
},
"staking_tx_hash_hex": {
"type": "string"
Expand All @@ -1209,7 +1235,7 @@ const docTemplate = `{
"type": "string"
},
"unbonding_time": {
"type": "integer"
"type": "string"
},
"unbonding_tx": {
"type": "string"
Expand Down Expand Up @@ -1256,6 +1282,9 @@ const docTemplate = `{
"active_delegations": {
"type": "integer"
},
"active_finality_providers": {
"type": "integer"
},
"active_stakers": {
"type": "integer"
},
Expand All @@ -1265,6 +1294,9 @@ const docTemplate = `{
"total_delegations": {
"type": "integer"
},
"total_finality_providers": {
"type": "integer"
},
"total_stakers": {
"type": "integer"
},
Expand All @@ -1290,32 +1322,6 @@ const docTemplate = `{
}
}
},
"v2service.StakerDelegationPublic": {
"type": "object",
"properties": {
"delegation_staking": {
"$ref": "#/definitions/v2service.DelegationStaking"
},
"delegation_unbonding": {
"$ref": "#/definitions/v2service.DelegationUnbonding"
},
"finality_provider_btc_pks_hex": {
"type": "array",
"items": {
"type": "string"
}
},
"params_version": {
"type": "integer"
},
"staker_btc_pk_hex": {
"type": "string"
},
"state": {
"$ref": "#/definitions/v2types.DelegationState"
}
}
},
"v2service.StakerStatsPublic": {
"type": "object",
"properties": {
Expand Down
84 changes: 45 additions & 39 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@
"200": {
"description": "Staker delegation",
"schema": {
"$ref": "#/definitions/handler.PublicResponse-v2service_StakerDelegationPublic"
"$ref": "#/definitions/handler.PublicResponse-v2service_DelegationPublic"
}
},
"400": {
Expand Down Expand Up @@ -467,7 +467,7 @@
"200": {
"description": "List of staker delegations and pagination token",
"schema": {
"$ref": "#/definitions/handler.PublicResponse-array_v2service_StakerDelegationPublic"
"$ref": "#/definitions/handler.PublicResponse-array_v2service_DelegationPublic"
}
},
"400": {
Expand Down Expand Up @@ -682,27 +682,27 @@
}
}
},
"handler.PublicResponse-array_v2service_FinalityProviderStatsPublic": {
"handler.PublicResponse-array_v2service_DelegationPublic": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/v2service.FinalityProviderStatsPublic"
"$ref": "#/definitions/v2service.DelegationPublic"
}
},
"pagination": {
"$ref": "#/definitions/handler.paginationResponse"
}
}
},
"handler.PublicResponse-array_v2service_StakerDelegationPublic": {
"handler.PublicResponse-array_v2service_FinalityProviderStatsPublic": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/v2service.StakerDelegationPublic"
"$ref": "#/definitions/v2service.FinalityProviderStatsPublic"
}
},
"pagination": {
Expand Down Expand Up @@ -743,22 +743,22 @@
}
}
},
"handler.PublicResponse-v2service_OverallStatsPublic": {
"handler.PublicResponse-v2service_DelegationPublic": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/v2service.OverallStatsPublic"
"$ref": "#/definitions/v2service.DelegationPublic"
},
"pagination": {
"$ref": "#/definitions/handler.paginationResponse"
}
}
},
"handler.PublicResponse-v2service_StakerDelegationPublic": {
"handler.PublicResponse-v2service_OverallStatsPublic": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/v2service.StakerDelegationPublic"
"$ref": "#/definitions/v2service.OverallStatsPublic"
},
"pagination": {
"$ref": "#/definitions/handler.paginationResponse"
Expand Down Expand Up @@ -1156,14 +1156,40 @@
}
}
},
"v2service.DelegationPublic": {
"type": "object",
"properties": {
"delegation_staking": {
"$ref": "#/definitions/v2service.DelegationStaking"
},
"delegation_unbonding": {
"$ref": "#/definitions/v2service.DelegationUnbonding"
},
"finality_provider_btc_pks_hex": {
"type": "array",
"items": {
"type": "string"
}
},
"params_version": {
"type": "integer"
},
"staker_btc_pk_hex": {
"type": "string"
},
"state": {
"$ref": "#/definitions/v2types.DelegationState"
}
}
},
"v2service.DelegationStaking": {
"type": "object",
"properties": {
"bbn_inception_height": {
"type": "integer"
},
"bbn_inception_time": {
"type": "integer"
"type": "string"
},
"end_height": {
"type": "integer"
Expand All @@ -1175,7 +1201,7 @@
"type": "integer"
},
"staking_time": {
"type": "integer"
"type": "string"
},
"staking_tx_hash_hex": {
"type": "string"
Expand All @@ -1201,7 +1227,7 @@
"type": "string"
},
"unbonding_time": {
"type": "integer"
"type": "string"
},
"unbonding_tx": {
"type": "string"
Expand Down Expand Up @@ -1248,6 +1274,9 @@
"active_delegations": {
"type": "integer"
},
"active_finality_providers": {
"type": "integer"
},
"active_stakers": {
"type": "integer"
},
Expand All @@ -1257,6 +1286,9 @@
"total_delegations": {
"type": "integer"
},
"total_finality_providers": {
"type": "integer"
},
"total_stakers": {
"type": "integer"
},
Expand All @@ -1282,32 +1314,6 @@
}
}
},
"v2service.StakerDelegationPublic": {
"type": "object",
"properties": {
"delegation_staking": {
"$ref": "#/definitions/v2service.DelegationStaking"
},
"delegation_unbonding": {
"$ref": "#/definitions/v2service.DelegationUnbonding"
},
"finality_provider_btc_pks_hex": {
"type": "array",
"items": {
"type": "string"
}
},
"params_version": {
"type": "integer"
},
"staker_btc_pk_hex": {
"type": "string"
},
"state": {
"$ref": "#/definitions/v2types.DelegationState"
}
}
},
"v2service.StakerStatsPublic": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit b6a296b

Please sign in to comment.