Skip to content

Commit

Permalink
Merge pull request #612 from oasisprotocol/lw/enum-proposal
Browse files Browse the repository at this point in the history
api: enum proposal states
  • Loading branch information
lukaw3d authored Jan 23, 2024
2 parents dc95e6b + a58f01c commit 3938ba3
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions api/spec/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -724,12 +724,12 @@ paths:
name: submitter
schema:
<<: *StakingAddressType
description: The submitter of the proposal.
description: Filter on the submitter of the proposal.
- in: query
name: state
schema:
type: string
description: The state of the proposal.
$ref: '#/components/schemas/ProposalState'
description: Filter on the state of the proposal.
example: *proposal_state_1
responses:
'200':
Expand Down Expand Up @@ -2058,6 +2058,12 @@ components:
type: string
description: The target propotocol versions for this upgrade proposal.

ProposalState:
type: string
enum: [active, passed, failed, rejected]
description: The state of the proposal.
example: 'active'

Proposal:
type: object
# TODO: Revise required fields. Most fields are required for actual proposals, and only absent
Expand All @@ -2076,9 +2082,7 @@ components:
description: The staking address of the proposal submitter.
example: *staking_address_1
state:
type: string
description: The state of the proposal.
example: 'active'
$ref: '#/components/schemas/ProposalState'
deposit:
<<: *BigIntType
description: The deposit attached to this proposal.
Expand Down

0 comments on commit 3938ba3

Please sign in to comment.