refactor(bruno): migrate API tests to Bruno DSL format
- Convert all existing .bru files from JSON to Bruno DSL format - Remove obsolete files (conflicts/api.bru, kobo/Kobo Initialization.bru) - Update auth configuration to use 'inherit' instead of explicit bearer tokens - Add comprehensive documentation to all test files - Improve test scripts with proper assertions and error handling
This commit is contained in:
@@ -7,9 +7,40 @@ meta {
|
||||
get {
|
||||
url: {{baseUrl}}/api/devices
|
||||
body: none
|
||||
auth: bearer
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
headers: {
|
||||
headers {
|
||||
Authorization: Bearer {{token}}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## List Devices
|
||||
|
||||
Lists all devices registered to the authenticated user's account.
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Endpoint:** /api/devices
|
||||
|
||||
**Authentication:** Bearer token
|
||||
|
||||
**Response:**
|
||||
- `devices` (array): Array of device objects
|
||||
- `id` (string): Device UUID
|
||||
- `name` (string): Device name
|
||||
- `device_type` (string): Type (kobo, koreader, web)
|
||||
- `last_sync` (string): Last sync timestamp
|
||||
- `is_active` (boolean): Whether device is active
|
||||
- `created_at` (string): Registration timestamp
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
- 401: Unauthorized
|
||||
- 500: Internal server error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user