mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
docs(api): 🐛 Add proper parameters to Roles API docs
This commit is contained in:
parent
eb405d33cd
commit
594e8ca4e6
|
|
@ -118,7 +118,9 @@ Get a list of all roles on the instance.
|
||||||
- `0.7.0`: Added.
|
- `0.7.0`: Added.
|
||||||
- `0.8.0`: Now returns all instance roles.
|
- `0.8.0`: Now returns all instance roles.
|
||||||
|
|
||||||
### Example
|
### Request
|
||||||
|
|
||||||
|
#### Example
|
||||||
|
|
||||||
```http
|
```http
|
||||||
GET /api/v1/roles
|
GET /api/v1/roles
|
||||||
|
|
@ -305,6 +307,14 @@ Create a new role.
|
||||||
|
|
||||||
### Request
|
### Request
|
||||||
|
|
||||||
|
- `name` (string, required): The name of the role.
|
||||||
|
- 1-128 characters.
|
||||||
|
- `permissions` (array of strings, optional): The permissions granted by the role. Defaults to an empty array.
|
||||||
|
- `priority` (number, optional): The priority of the role. Defaults to `0`.
|
||||||
|
- `description` (string, optional): A description of the role.
|
||||||
|
- `visible` (boolean, optional): Whether the role is visible in the UI. Defaults to `false`.
|
||||||
|
- `icon` (string, optional): An icon URL for the role.
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
```http
|
```http
|
||||||
|
|
@ -396,6 +406,14 @@ Update a role's data.
|
||||||
|
|
||||||
### Request
|
### Request
|
||||||
|
|
||||||
|
- `name` (string, required): The name of the role.
|
||||||
|
- 1-128 characters.
|
||||||
|
- `permissions` (array of strings, optional): The permissions granted by the role. Defaults to an empty array.
|
||||||
|
- `priority` (number, optional): The priority of the role. Defaults to `0`.
|
||||||
|
- `description` (string, optional): A description of the role.
|
||||||
|
- `visible` (boolean, optional): Whether the role is visible in the UI. Defaults to `false`.
|
||||||
|
- `icon` (string, optional): An icon URL for the role.
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
```http
|
```http
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue