Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): 🐛 do not use integers as string #62

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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