Skip to content

Commit

Permalink
fix(api): 🐛 do not use integers as string
Browse files Browse the repository at this point in the history
import some integers as both integers and strings to use them in the correct mode in different occasion
  • Loading branch information
matteo-cristino committed Dec 12, 2023
1 parent 745bc2b commit c4291b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions api/v1/common/pubkeys-accept-2-checks.zen
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and I read the content of 'signer_path' and save the output into 'signer_data'
# restroom data
Given I have a 'string' named 'base_url' inside 'http_request'
and I have a 'string dictionary' named 'request_data'
and I have a 'string' named 'accept_timestamp'
and I rename 'accept_timestamp' to 'accept_timestamp_str'
and I have a 'integer' named 'accept_timestamp'
and I have a 'did document' named 'didDocument' in 'signer_data'
and I rename 'didDocument' to 'signer_did_document'
Expand Down Expand Up @@ -67,7 +69,7 @@ and I verify the 'json escaped string' has a ecdh signature in 'ecdh signature'
# create proof
When I create the jws signature using the ecdh signature in 'ecdh signature'
and I move 'jws' in 'proof'
and I copy the 'accept_timestamp' to 'created' in 'proof'
and I copy the 'accept_timestamp_str' to 'created' in 'proof'

# proof's verification method
When I copy 'signer_id' to 'verificationMethod'
Expand All @@ -77,7 +79,7 @@ and I move 'proof' in 'request did document'

# metadata
When I create the 'string dictionary' named 'didDocumentMetadata'
and I copy the 'accept_timestamp' to 'created' in 'didDocumentMetadata'
and I copy the 'accept_timestamp_str' to 'created' in 'didDocumentMetadata'
and I set 'deactivated' to 'false' as 'string'
and I move 'deactivated' in 'didDocumentMetadata'

Expand Down
6 changes: 4 additions & 2 deletions api/v1/common/pubkeys-update-2-checks.zen
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and I read the content of 'request_path' and save the output into 'request_data'

# restroom data
Given I have a 'string' named 'base_url' inside 'http_request'
and I have a 'string' named 'update_timestamp'
and I rename 'update_timestamp' to 'update_timestamp_str'
and I have a 'integer' named 'update_timestamp'
and I have a 'did document' named 'didDocument' in 'signer_data'
and I rename 'didDocument' to 'signer_did_document'
Expand Down Expand Up @@ -66,7 +68,7 @@ and I verify the 'json escaped string' has a ecdh signature in 'ecdh signature'
# create proof
When I create the jws signature using the ecdh signature in 'ecdh signature'
and I move 'jws' in 'proof'
and I copy the 'update_timestamp' to 'created' in 'proof'
and I copy the 'update_timestamp_str' to 'created' in 'proof'

# proof's verification method
When I copy 'signer_id' to 'verificationMethod'
Expand All @@ -78,7 +80,7 @@ and I move 'proof' in 'request did document'
If I verify 'updated' is found in 'request_metadata'
When I remove the 'updated' from 'request_metadata'
EndIf
When I copy the 'update_timestamp' to 'updated' in 'request_metadata'
When I copy the 'update_timestamp_str' to 'updated' in 'request_metadata'

# result
When I create the 'string dictionary' named 'result'
Expand Down

0 comments on commit c4291b0

Please sign in to comment.