diff --git a/shared/transactions/credential_accept.yaml b/shared/transactions/credential_accept.yaml index 87a2df6..3886353 100644 --- a/shared/transactions/credential_accept.yaml +++ b/shared/transactions/credential_accept.yaml @@ -13,10 +13,14 @@ components: properties: CredentialType: type: string + pattern: '^[0-9a-fA-F]+$' description: Arbitrary data defining the type of credential. The minimum size is 1 byte and the maximum is 64 bytes. Issuer: type: string description: The address of the issuer that created the credential. + x-custom-validation: + validCredentialType: + field: CredentialType CredentialAcceptErrorCode: $id: CredentialAcceptErrorCode diff --git a/shared/transactions/credential_create.yaml b/shared/transactions/credential_create.yaml index 9181684..6dc945c 100644 --- a/shared/transactions/credential_create.yaml +++ b/shared/transactions/credential_create.yaml @@ -16,6 +16,7 @@ components: properties: CredentialType: type: string + pattern: '^[0-9a-fA-F]+$' description: Arbitrary data defining the type of credential this entry represents. The minimum length is 1 byte and the maximum length is 64 bytes. Expiration: type: number @@ -26,9 +27,14 @@ components: description: The subject of the credential. URI: type: string + pattern: '^[0-9a-fA-F]+$' + maxLength: 512 description: | Arbitrary additional data about the credential, such as the URL where users can look up an associated Verifiable Credential document. If present, the minimum length is 1 byte and the maximum is 256 bytes. + x-custom-validation: + validCredentialType: + field: CredentialType CredentialCreateErrorCode: $id: CredentialCreateErrorCode diff --git a/shared/transactions/credential_delete.yaml b/shared/transactions/credential_delete.yaml index 8414566..a278024 100644 --- a/shared/transactions/credential_delete.yaml +++ b/shared/transactions/credential_delete.yaml @@ -13,6 +13,7 @@ components: properties: CredentialType: type: string + pattern: '^[0-9a-fA-F]+$' description: Arbitrary data defining the type of credential to delete. The minimum length is 1 byte and the maximum length is 256 bytes. Subject: type: string @@ -25,6 +26,8 @@ components: - fields: - Subject - Issuer + validCredentialType: + field: CredentialType CredentialDeleteErrorCode: $id: CredentialDeleteErrorCode