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

The roles attribute is missing from the Account entity #1483

Open
anosidium opened this issue Jul 13, 2024 · 3 comments
Open

The roles attribute is missing from the Account entity #1483

anosidium opened this issue Jul 13, 2024 · 3 comments

Comments

@anosidium
Copy link

The documentation does not list roles (plural) attribute in the Account entity but it does list role (singular) attribute. I found out by inspecting the Instance entity of various instances using this endpoint: GET /api/v2/instance.

It returns an array of Role entities but permissions and highlighted attribute are absent. So the documentation for Role entity should mark these attributes as nullable.

@ClearlyClaire
Copy link
Contributor

At this time, the CredentialAccount entity does have a (singular) role attribute, so that is correct.

The Account entity is indeed lacking documentation for the roles attribute added in Mastodon v4.1.0. The type of the CredentialAccount role attribute is slightly different from the Account roles, which indeed omits permissions and highlighted.

@anosidium
Copy link
Author

So what you are saying is that CredentialAccount entity role attribute return a Role entity but roles attribute return an array of a different entity type? If so then that entity needs to be added to the API Entities list.

@ClearlyClaire
Copy link
Contributor

Yes, that's it, they are of a different type, and the roles in Account are unfortunately currently undocumented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants