diff --git a/aries_cloudagent/protocols/present_proof/v1_0/routes.py b/aries_cloudagent/protocols/present_proof/v1_0/routes.py index b5c63bd608..6bb986c333 100644 --- a/aries_cloudagent/protocols/present_proof/v1_0/routes.py +++ b/aries_cloudagent/protocols/present_proof/v1_0/routes.py @@ -204,12 +204,9 @@ class IndyProofRequestSchema(Schema): non_revoked = fields.Nested(IndyProofReqNonRevokedSchema(), required=False) -class V10PresentationRequestRequestSchema(AdminAPIMessageTracingSchema): - """Request schema for sending a proof request.""" +class V10PresentationCreateRequestRequestSchema(AdminAPIMessageTracingSchema): + """Request schema for creating a proof request free of any connection.""" - connection_id = fields.UUID( - description="Connection identifier", required=True, example=UUIDFour.EXAMPLE - ) proof_request = fields.Nested(IndyProofRequestSchema(), required=True) comment = fields.Str(required=False) trace = fields.Bool( @@ -219,6 +216,16 @@ class V10PresentationRequestRequestSchema(AdminAPIMessageTracingSchema): ) +class V10PresentationSendRequestRequestSchema( + V10PresentationCreateRequestRequestSchema +): + """Request schema for sending a proof request on a connection.""" + + connection_id = fields.UUID( + description="Connection identifier", required=True, example=UUIDFour.EXAMPLE + ) + + class IndyRequestedCredsRequestedAttrSchema(Schema): """Schema for requested attributes within indy requested credentials structure.""" @@ -511,7 +518,7 @@ async def presentation_exchange_send_proposal(request: web.BaseRequest): Creates a presentation request not bound to any proposal or existing connection """, ) -@request_schema(V10PresentationRequestRequestSchema()) +@request_schema(V10PresentationCreateRequestRequestSchema()) @response_schema(V10PresentationExchangeSchema(), 200) async def presentation_exchange_create_request(request: web.BaseRequest): """ @@ -577,7 +584,7 @@ async def presentation_exchange_create_request(request: web.BaseRequest): tags=["present-proof"], summary="Sends a free presentation request not bound to any proposal", ) -@request_schema(V10PresentationRequestRequestSchema()) +@request_schema(V10PresentationSendRequestRequestSchema()) @response_schema(V10PresentationExchangeSchema(), 200) async def presentation_exchange_send_free_request(request: web.BaseRequest): """ @@ -653,7 +660,7 @@ async def presentation_exchange_send_free_request(request: web.BaseRequest): summary="Sends a presentation request in reference to a proposal", ) @match_info_schema(PresExIdMatchInfoSchema()) -@request_schema(V10PresentationRequestRequestSchema()) +@request_schema(V10PresentationSendRequestRequestSchema()) @response_schema(V10PresentationExchangeSchema(), 200) async def presentation_exchange_send_bound_request(request: web.BaseRequest): """