diff --git a/plugins/basicmessage_storage/basicmessage_storage/v1_0/models.py b/plugins/basicmessage_storage/basicmessage_storage/v1_0/models.py index 1c36525e8..5044b9100 100644 --- a/plugins/basicmessage_storage/basicmessage_storage/v1_0/models.py +++ b/plugins/basicmessage_storage/basicmessage_storage/v1_0/models.py @@ -83,9 +83,10 @@ class Meta: connection_id = fields.Str(required=False) message_id = fields.Str(required=False) - sent_time = fields.Str(required=False, + sent_time = fields.Str( + required=False, validate=INDY_ISO8601_DATETIME_VALIDATE, - example=INDY_ISO8601_DATETIME_EXAMPLE + example=INDY_ISO8601_DATETIME_EXAMPLE, ) locale = fields.Str(required=False) content = fields.Str(required=False) diff --git a/plugins/traction_innkeeper/traction_innkeeper/__init__.py b/plugins/traction_innkeeper/traction_innkeeper/__init__.py index 2c4db4aec..e69de29bb 100644 --- a/plugins/traction_innkeeper/traction_innkeeper/__init__.py +++ b/plugins/traction_innkeeper/traction_innkeeper/__init__.py @@ -1,21 +0,0 @@ -from aries_cloudagent.messaging.valid import ( - INDY_SCHEMA_ID_VALIDATE, - INDY_SCHEMA_ID_EXAMPLE, - INDY_REV_REG_SIZE_VALIDATE, - INDY_REV_REG_SIZE_EXAMPLE, - INDY_CRED_DEF_ID_VALIDATE, - INDY_CRED_DEF_ID_EXAMPLE, -) - -INDY_SCHEMA_ID = { - "validate": INDY_SCHEMA_ID_VALIDATE, - "example": INDY_SCHEMA_ID_EXAMPLE, -} -INDY_REV_REG_SIZE = { - "validate": INDY_REV_REG_SIZE_VALIDATE, - "example": INDY_REV_REG_SIZE_EXAMPLE, -} -INDY_CRED_DEF_ID = { - "validate": INDY_CRED_DEF_ID_VALIDATE, - "example": INDY_CRED_DEF_ID_EXAMPLE, -} diff --git a/plugins/traction_innkeeper/traction_innkeeper/v1_0/creddef_storage/models.py b/plugins/traction_innkeeper/traction_innkeeper/v1_0/creddef_storage/models.py index 05a317369..1868efefb 100644 --- a/plugins/traction_innkeeper/traction_innkeeper/v1_0/creddef_storage/models.py +++ b/plugins/traction_innkeeper/traction_innkeeper/v1_0/creddef_storage/models.py @@ -7,23 +7,10 @@ INDY_REV_REG_SIZE_VALIDATE, INDY_REV_REG_SIZE_EXAMPLE, INDY_CRED_DEF_ID_VALIDATE, - INDY_CRED_DEF_ID_EXAMPLE + INDY_CRED_DEF_ID_EXAMPLE, ) from marshmallow import EXCLUDE, fields -try: - from aries_cloudagent.messaging.valid import ( - INDY_SCHEMA_ID, - INDY_REV_REG_SIZE, - INDY_CRED_DEF_ID, - ) -except ImportError: - from ... import ( - INDY_SCHEMA_ID, - INDY_REV_REG_SIZE, - INDY_CRED_DEF_ID, - ) - class CredDefStorageRecord(BaseRecord): """Traction CredDef Storage Record.""" @@ -82,12 +69,12 @@ class Meta: required=True, description="Cred Def identifier", validate=INDY_CRED_DEF_ID_VALIDATE, - example=INDY_CRED_DEF_ID_EXAMPLE + example=INDY_CRED_DEF_ID_EXAMPLE, ) schema_id = fields.Str( description="Schema identifier", validate=INDY_SCHEMA_ID_VALIDATE, - example=INDY_SCHEMA_ID_EXAMPLE + example=INDY_SCHEMA_ID_EXAMPLE, ) support_revocation = fields.Boolean( required=False, description="Revocation supported flag" diff --git a/plugins/traction_innkeeper/traction_innkeeper/v1_0/oca/models.py b/plugins/traction_innkeeper/traction_innkeeper/v1_0/oca/models.py index 8103bbf2e..89a16d909 100644 --- a/plugins/traction_innkeeper/traction_innkeeper/v1_0/oca/models.py +++ b/plugins/traction_innkeeper/traction_innkeeper/v1_0/oca/models.py @@ -6,20 +6,10 @@ INDY_SCHEMA_ID_EXAMPLE, INDY_CRED_DEF_ID_VALIDATE, INDY_CRED_DEF_ID_EXAMPLE, - UUIDFour + UUIDFour, ) from marshmallow import EXCLUDE, fields -try: - from aries_cloudagent.messaging.valid import ( - INDY_SCHEMA_ID, - INDY_CRED_DEF_ID, - UUIDFour, - ) -except ImportError: - from ... import INDY_SCHEMA_ID, INDY_CRED_DEF_ID - from aries_cloudagent.messaging.valid import UUIDFour - class OcaRecord(BaseRecord): """Traction OCA Record.""" @@ -88,13 +78,13 @@ class Meta: required=False, description="Schema identifier", validate=INDY_SCHEMA_ID_VALIDATE, - example=INDY_SCHEMA_ID_EXAMPLE + example=INDY_SCHEMA_ID_EXAMPLE, ) cred_def_id = fields.Str( - required=False, + required=False, description="Cred Def identifier", validate=INDY_CRED_DEF_ID_VALIDATE, - example=INDY_CRED_DEF_ID_EXAMPLE + example=INDY_CRED_DEF_ID_EXAMPLE, ) url = fields.Str(required=False, description="(Public) Url for OCA Bundle") bundle = fields.Dict( diff --git a/plugins/traction_innkeeper/traction_innkeeper/v1_0/oca/routes.py b/plugins/traction_innkeeper/traction_innkeeper/v1_0/oca/routes.py index 8fca3785a..a67cf2e04 100644 --- a/plugins/traction_innkeeper/traction_innkeeper/v1_0/oca/routes.py +++ b/plugins/traction_innkeeper/traction_innkeeper/v1_0/oca/routes.py @@ -17,21 +17,11 @@ INDY_SCHEMA_ID_VALIDATE, INDY_CRED_DEF_ID_EXAMPLE, INDY_CRED_DEF_ID_VALIDATE, - UUIDFour + UUIDFour, ) from aries_cloudagent.storage.error import StorageNotFoundError, StorageError from marshmallow import fields, ValidationError -try: - from aries_cloudagent.messaging.valid import ( - INDY_SCHEMA_ID, - INDY_CRED_DEF_ID, - UUIDFour, - ) -except ImportError: - from ... import INDY_SCHEMA_ID, INDY_CRED_DEF_ID - from aries_cloudagent.messaging.valid import UUIDFour - from . import OcaService from .models import OcaRecordSchema from .oca_service import PublicDIDRequiredError, PublicDIDMismatchError @@ -86,13 +76,13 @@ class AddOcaRecordRequestSchema(OpenAPISchema): required=False, description="Schema identifier", validate=INDY_SCHEMA_ID_VALIDATE, - example=INDY_SCHEMA_ID_EXAMPLE + example=INDY_SCHEMA_ID_EXAMPLE, ) cred_def_id = fields.Str( required=False, description="Cred Def identifier", validate=INDY_CRED_DEF_ID_VALIDATE, - example=INDY_CRED_DEF_ID_EXAMPLE + example=INDY_CRED_DEF_ID_EXAMPLE, ) url = fields.Str(required=False, description="(Public) Url for OCA Bundle") bundle = fields.Dict( diff --git a/plugins/traction_innkeeper/traction_innkeeper/v1_0/schema_storage/models.py b/plugins/traction_innkeeper/traction_innkeeper/v1_0/schema_storage/models.py index abad657ba..2cde3c33f 100644 --- a/plugins/traction_innkeeper/traction_innkeeper/v1_0/schema_storage/models.py +++ b/plugins/traction_innkeeper/traction_innkeeper/v1_0/schema_storage/models.py @@ -7,11 +7,6 @@ ) from marshmallow import EXCLUDE, fields -try: - from aries_cloudagent.messaging.valid import INDY_SCHEMA_ID -except ImportError: - from ... import INDY_SCHEMA_ID - class SchemaStorageRecord(BaseRecord): """Traction Schema Storage Record."""