docs(api): 🐛 Add proper parameters to Roles API docs

This commit is contained in:
Jesse Wierzbinski 2024-11-28 10:59:14 +01:00
parent eb405d33cd
commit 594e8ca4e6
No known key found for this signature in database

View file

@ -118,7 +118,9 @@ Get a list of all roles on the instance.
- `0.7.0`: Added.
- `0.8.0`: Now returns all instance roles.
### Example
### Request
#### Example
```http
GET /api/v1/roles
@ -305,6 +307,14 @@ Create a new role.
### 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
```http
@ -396,6 +406,14 @@ Update a role's data.
### 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
```http