-
Notifications
You must be signed in to change notification settings - Fork 25
Fix examples, add valid keys case #56
base: docs
Are you sure you want to change the base?
Conversation
grimadas
commented
Feb 2, 2018
- Fix comma issue as described in Client API support for MST iroha#779
- Replace ... with valid keys
Signed-off-by: grimadas <bulat.nasrulin@gmail.com>
Signed-off-by: grimadas <bulat.nasrulin@gmail.com>
Signed-off-by: grimadas <bulat.nasrulin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run validator on examples.
source/includes/_transactions.md
Outdated
@@ -11,11 +11,16 @@ message Transaction { | |||
```json | |||
{ | |||
/* Transaction */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such comments are not valid JSON syntax, consider removing.
source/includes/_transactions.md
Outdated
"created_ts": 1517560129182, | ||
"creator_account_id": "admin@test", | ||
"tx_counter": 1, | ||
"commands": [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Transactions with no commands are currently invalid, consider adding a small command, such as AddPeer
.
source/includes/_transactions.md
Outdated
@@ -53,13 +58,12 @@ message Payload { | |||
{ | |||
"commands": [ | |||
{ | |||
"command_type": string(?), | |||
/* other command-specific fields */ | |||
/* command-specific fields */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such comments are invalid JSON syntax. Also empty commands are not currently accepted, consider adding a small command such as AddPeer
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example for the valid transaction is provided above, this is used for explanation. Is it necessary to complicate it, as it might hurt the explanation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concern is that person can just try to copy and paste the example and try to run it with iroha-cli. Maybe this explanation can be done in text, and not in JSON?
source/includes/_transactions.md
Outdated
@@ -75,10 +79,10 @@ message Signature { | |||
{ | |||
"signatures": [ | |||
{ | |||
"pubkey": string(64), | |||
"signature": string(128), | |||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space looks redundant, maybe run some JSON beautifier on examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
source/includes/_queries.md
Outdated
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetTransactions", | ||
"tx_hashes": [string(64),…] | ||
"tx_hashes": [bf6edb882d53f5532cb416455834878db7af08fb814f8c95d6867a6d9eea4057] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is valid, since other hex strings are enclosed in ""
.
Signed-off-by: grimadas <bulat.nasrulin@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GetAccountDetail
query is mssing
Check the rest details of all types, there's also a lot outdated info here
Also uppercase letters allowed only at the json's keys
source/includes/_commands.md
Outdated
@@ -357,9 +356,9 @@ message DetachRole { | |||
{ | |||
"command_type": "DetachRole", | |||
"account_id": "test@test", | |||
"role_name": "user" | |||
"role_name": "User" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Role should be in lower case
source/includes/_commands.md
Outdated
@@ -319,11 +319,10 @@ message CreateRole { | |||
"command_type": "CreateRole", | |||
"role_name": "MoneyCreator", | |||
"permissions": [ | |||
"CanAddAssetQuantity", | |||
… | |||
"CanAddAssetQuantity" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was changed to can_add_asset_quantity
at hyperledger-iroha/iroha@999a1c7
"pubkey": "…", | ||
"signature": "…" | ||
"pubkey": "407e57f50ca48969b08ba948171bb2435e035d82cec417e18e4a38f5fb113f83", | ||
"signature": "81744e004555970ad114a2b8f7a0d1bb087e26c6e009a6147781a5042dbbf8e00f1fd5a4d4ddb123c1c0813f00d633b7295e482a43001edbe7f51dd4d32aef05" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why all of the signatures are the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just an example, don't worry
source/includes/_queries.md
Outdated
"creator_account_id": "admin@test", | ||
"query_counter": 1, | ||
"query_type" : "GetRolePermissions", | ||
"role_id" : "MoneyCreator", | ||
"role_id" : "MoneyCreator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again role
Signed-off-by: grimadas <bulat.nasrulin@gmail.com>
source/includes/_commands.md
Outdated
@@ -393,9 +392,9 @@ message GrantPermission { | |||
{ | |||
"command_type": "GrantPermission", | |||
"account_id": "takemiya@soramitsu", | |||
"permission_name": "CanAddAssetQuantity" | |||
"permission_name": "can_add_asset_quantity" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can_add_asset_qty
:(
source/includes/_commands.md
Outdated
@@ -164,9 +164,9 @@ message AppendRole { | |||
{ | |||
"command_type": "AppendRole", | |||
"account_id": "takemiya@test", | |||
"role_name": "Administrator" | |||
"role_name": "administrator" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems it too long
source/includes/_commands.md
Outdated
@@ -469,9 +468,9 @@ message RevokePermission { | |||
{ | |||
"command_type": "RevokePermission", | |||
"account_id": "takemiya@soramitsu", | |||
"permission_name": "CanAddAssetQuantity" | |||
"permission_name": "can_add_asset_quantity" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
source/includes/_transactions.md
Outdated
"commands":[ | ||
{ | ||
"command_type":"CreateAccount", | ||
"account_name":"makoto.takemiya", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'.' isn't accepted
Signed-off-by: grimadas <bulat.nasrulin@gmail.com>
Signed-off-by: grimadas <bulat.nasrulin@gmail.com>
Any progress on that? |