@@ -422,18 +422,31 @@ instance ToSchema ProposalAuthors where
422422 & example ?~ toJSON
423423 [ object
424424 [ " name" .= (" Alice" :: Text )
425- , " witness_algorithm " .= (" algo" :: Text )
426- , " public_key " .= (" key" :: Text )
425+ , " witnessAlgorithm " .= (" algo" :: Text )
426+ , " publicKey " .= (" key" :: Text )
427427 , " signature" .= (" sig" :: Text )
428428 ]
429429 , object
430430 [ " name" .= (" Bob" :: Text )
431- , " witness_algorithm " .= (" algo2" :: Text )
432- , " public_key " .= (" key2" :: Text )
431+ , " witnessAlgorithm " .= (" algo2" :: Text )
432+ , " publicKey " .= (" key2" :: Text )
433433 , " signature" .= (" sig2" :: Text )
434434 ]
435435 ]
436436
437+ exampleProposalAuthors :: Text
438+ exampleProposalAuthors =
439+ " [\
440+ \ {\" name\" : \" Alice\" ,\
441+ \ \" witnessAlgorithm\" : \" Ed25519\" ,\
442+ \ \" publicKey\" : \" abcdef123456\" ,\
443+ \ \" signature\" : \" deadbeef\" },\
444+ \ {\" name\" : \" Bob\" ,\
445+ \ \" witnessAlgorithm\" : \" Ed25519\" ,\
446+ \ \" publicKey\" : \" 123456abcdef\" ,\
447+ \ \" signature\" : \" beefdead\" }\
448+ \]"
449+
437450deriveJSON (jsonOptions " proposalResponse" ) ''ProposalResponse
438451
439452exampleProposalResponse :: Text
@@ -463,7 +476,9 @@ exampleProposalResponse = "{ \"id\": \"proposalId123\","
463476 <> " \" cCNoVotes\" : 0,"
464477 <> " \" cCAbstainVotes\" : 0,"
465478 <> " \" prevGovActionIndex\" : 0,"
466- <> " \" prevGovActionTxHash\" : \" 47c14a128cd024f1b990c839d67720825921ad87ed875def42641ddd2169b39c\" }"
479+ <> " \" prevGovActionTxHash\" : \" 47c14a128cd024f1b990c839d67720825921ad87ed875def42641ddd2169b39c\" ,"
480+ <> " \" authors\" : " <> exampleProposalAuthors
481+ <> " }"
467482
468483instance ToSchema Value where
469484 declareNamedSchema _ = pure $ NamedSchema (Just " Value" ) $ mempty
0 commit comments