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 in schema #4886

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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 2 times, most recently from 6ac3437 to 687ad76 Compare July 23, 2024 20:11
Signed-off-by: Marin Veršić <marin.versic101@gmail.com>
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.

None yet

1 participant