diff --git a/lib/wallet/test/unit/Cardano/Wallet/Api/TypesSpec.hs b/lib/wallet/test/unit/Cardano/Wallet/Api/TypesSpec.hs index 81cb17051a3..47418aeedcd 100644 --- a/lib/wallet/test/unit/Cardano/Wallet/Api/TypesSpec.hs +++ b/lib/wallet/test/unit/Cardano/Wallet/Api/TypesSpec.hs @@ -819,6 +819,7 @@ spec = do jsonTest @WalletPutPassphraseData jsonTest @(ApiRewardAccount T0) jsonTest @(ApiExternalCertificate T0) + jsonTest @ApiVoteAction describe "ApiEra roundtrip" $ it "toApiEra . fromApiEra == id" $ property $ \era -> do @@ -2810,6 +2811,10 @@ instance ToSchema WalletPutPassphraseData where declareNamedSchema _ = declareSchemaForDefinition "ApiWalletPutPassphraseData" +instance ToSchema ApiVoteAction where + declareNamedSchema _ = + declareSchemaForDefinition "ApiVoteAction" + instance ToSchema ByronWalletPutPassphraseData where declareNamedSchema _ = declareSchemaForDefinition "ApiByronWalletPutPassphraseData" diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index 9e7dd8528d3..058ae4ee32f 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -1401,19 +1401,6 @@ x-softIndex: &softIndex maximum: 2147483647 description: A soft derivation index. -x-transactionVote: &transactionVote - description: | - Voting action. One can abstain, give no confidence vote - or vote for a representative by specifying its key hash or script hash. - Voting can be done together with delegation action. - oneOf: - - type: string - enum: - - abstain - - no_confidence - - type: string - <<: *drep - x-multiDelegationAction: &multiDelegationAction description: | A delegation action for a given stake key denoted by its soft index. @@ -3697,6 +3684,19 @@ components: asset_name: *assetName operation: *ApiMintBurnOperation + ApiVoteAction: &ApiVoteAction + description: | + Voting action. One can abstain, give no confidence vote + or vote for a representative by specifying its key hash or script hash. + Voting can be done together with delegation action. + oneOf: + - type: string + enum: + - abstain + - no_confidence + - type: string + <<: *drep + ApiConstructTransactionData: &ApiConstructTransactionData description: At least one field needs to be chosen type: object @@ -3711,7 +3711,7 @@ components: description: | An entry for each unique asset to be minted and/or burned, containing helpful information. - vote: *transactionVote + vote: *ApiVoteAction delegations: *transactionDelegations validity_interval: *ApiValidityInterval reference_policy_script_template: