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(schema): make Role transparent #4886

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

mversic
Copy link
Contributor

@mversic mversic commented Jul 23, 2024

Description

  • make Role transparent in schema
  • rename NewXXX to XXX when serializing as json

This is how schema looked like:

"NewRole": {
  "Struct": [
    {
      "name": "inner",
      "type": "Role"
    }
  ]
},

but in genesis it was:

{
  "Register": {
    "Role": {
      "id": "ALICE_METADATA_ACCESS",
      "permissions": [
        {
          "name": "CanRemoveKeyValueInAccount",
          "payload": {
            "account": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland"
          }
        },
        {
          "name": "CanSetKeyValueInAccount",
          "payload": {
            "account": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland"
          }
        }
      ]
    }
  }
},

which is the consequence of the fact that we have no way of representing transparency in schema

Linked issue

Related to #1660

Benefits

Checklist

  • I've read CONTRIBUTING.md
  • I've used the standard signed-off commit format (or will squash just before merging)
  • All applicable CI checks pass (or I promised to make them pass later)
  • (optional) I've written unit tests for the code changes
  • I replied to all comments after code review, marking all implemented changes with thumbs up

@github-actions github-actions bot added the api-changes Changes in the API for client libraries label Jul 23, 2024
@mversic mversic force-pushed the schema_fix branch 3 times, most recently from 687ad76 to fd8c7d2 Compare July 23, 2024 20:12
@mversic mversic requested a review from Erigara July 24, 2024 10:39
@mversic mversic changed the title fix(schema): make Role transparent in schema fix(schema): make Role transparent Jul 24, 2024
@mversic mversic force-pushed the schema_fix branch 3 times, most recently from 945a25b to afcc006 Compare July 24, 2024 10:44
@mversic mversic enabled auto-merge (squash) July 24, 2024 11:06
@mversic mversic merged commit 79cfafc into hyperledger-iroha:main Jul 24, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-changes Changes in the API for client libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants