File tree Expand file tree Collapse file tree
aries_cloudagent/protocols/out_of_band/v1_0/models Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import json
44from typing import Any , Mapping , Optional , Union
55
6- from marshmallow import fields
6+ from marshmallow import fields , validate
77
88from .....connections .models .conn_record import ConnRecord
99from .....core .profile import ProfileSession
@@ -248,6 +248,9 @@ class Meta:
248248 required = True ,
249249 description = "Out of band message exchange state" ,
250250 example = OobRecord .STATE_AWAIT_RESPONSE ,
251+ validate = validate .OneOf (
252+ OobRecord .get_attributes_by_prefix ("STATE_" , walk_mro = True )
253+ ),
251254 )
252255 invi_msg_id = fields .Str (
253256 required = True ,
@@ -287,4 +290,7 @@ class Meta:
287290 description = "OOB Role" ,
288291 required = False ,
289292 example = OobRecord .ROLE_RECEIVER ,
293+ validate = validate .OneOf (
294+ OobRecord .get_attributes_by_prefix ("ROLE_" , walk_mro = False )
295+ ),
290296 )
You can’t perform that action at this time.
0 commit comments