Skip to content

Commit

Permalink
Merge pull request #2732 from vegaprotocol/feature/2507-proposal-get-all
Browse files Browse the repository at this point in the history
add rest endpoint to get all proposals
  • Loading branch information
jeremyletang committed Dec 15, 2020
1 parent 9c156f9 commit aeb47e3
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gateway/rest/grpc-rest-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ http:
get: '/governance/market/proposals'
- selector: api.trading_data.GetNewAssetProposals
get: '/governance/asset/proposals'
- selector: api.trading_data.GetProposals
get: '/governance/proposals'


# LiquidityProvision
Expand Down
41 changes: 41 additions & 0 deletions proto/api/trading.pb.gw.go

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

37 changes: 37 additions & 0 deletions proto/api/trading.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,43 @@
]
}
},
"/governance/proposals": {
"get": {
"summary": "Get governance data (proposals and votes) for all proposals",
"operationId": "GetProposals",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiGetProposalsResponse"
}
}
},
"parameters": [
{
"name": "selectInState.value",
"description": "Proposal state value.\n\n - STATE_UNSPECIFIED: Default value, always invalid.\n - STATE_FAILED: Proposal enactment has failed - even though proposal has passed, its execution could not be performed.\n - STATE_OPEN: Proposal is open for voting.\n - STATE_PASSED: Proposal has gained enough support to be executed.\n - STATE_REJECTED: Proposal wasn't accepted (proposal terms failed validation due to wrong configuration or failing to meet network requirements).\n - STATE_DECLINED: Proposal didn't get enough votes (either failing to gain required participation or majority level).\n - STATE_ENACTED: Proposal enacted.\n - STATE_WAITING_FOR_NODE_VOTE: Waiting for node validation of the proposal",
"in": "query",
"required": false,
"type": "string",
"enum": [
"STATE_UNSPECIFIED",
"STATE_FAILED",
"STATE_OPEN",
"STATE_PASSED",
"STATE_REJECTED",
"STATE_DECLINED",
"STATE_ENACTED",
"STATE_WAITING_FOR_NODE_VOTE"
],
"default": "STATE_UNSPECIFIED"
}
],
"tags": [
"trading_data"
]
}
},
"/liquidity-provisions": {
"get": {
"operationId": "PrepareLiquidityProvision2",
Expand Down

0 comments on commit aeb47e3

Please sign in to comment.