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,52 +7,87 @@ meta {
|
||||
get {
|
||||
url: {{baseUrl}}/api/conflicts/{{conflict_id}}
|
||||
body: none
|
||||
auth: bearer
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
headers: {
|
||||
headers {
|
||||
Authorization: Bearer {{token}}
|
||||
}
|
||||
|
||||
docs: {
|
||||
Retrieves detailed information about a specific conflict.
|
||||
|
||||
Path Parameters:
|
||||
- conflict_id: UUID of the conflict
|
||||
|
||||
Response includes:
|
||||
- id: Conflict UUID
|
||||
- media_item_id: Associated book UUID
|
||||
- media_item_title: Book title
|
||||
- conflict_type: Type of conflict
|
||||
- conflict_data: Side-by-side comparison with sources:
|
||||
* source: Device/source identifier (koreader, kobo, web, etc.)
|
||||
* timestamp: When this progress was recorded
|
||||
* data: The conflicting data (percentage, epubcfi, chapter, etc.)
|
||||
- resolution_status: Current status
|
||||
- resolution_data: If resolved, includes resolution details
|
||||
- resolved_by: User ID who resolved it (if applicable)
|
||||
- resolved_at: When it was resolved (if applicable)
|
||||
- created_at: When conflict was detected
|
||||
|
||||
Example conflict_data:
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Get Conflict Details
|
||||
|
||||
Retrieves detailed information about a specific conflict, including side-by-side comparison of conflicting data from all sources.
|
||||
|
||||
**Method:** GET
|
||||
|
||||
**Endpoint:** /api/conflicts/{conflict_id}
|
||||
|
||||
**Authentication:** Bearer token
|
||||
|
||||
**Path Parameters:**
|
||||
- `conflict_id` (string): Conflict UUID
|
||||
|
||||
**Response:**
|
||||
- `id` (string): Conflict UUID
|
||||
- `media_item_id` (string): Associated book UUID
|
||||
- `media_item_title` (string): Book title
|
||||
- `conflict_type` (string): Type of conflict (progress, note, highlight)
|
||||
- `conflict_data` (object): Side-by-side comparison from each source
|
||||
- Each source includes:
|
||||
- `source` (string): Device/source identifier (koreader, kobo, web, etc.)
|
||||
- `timestamp` (string): When this data was recorded
|
||||
- `data` (object): The conflicting data
|
||||
- `percentage` (number): Reading progress
|
||||
- `epubcfi` (string): EPUB location
|
||||
- `chapter` (number): Chapter number
|
||||
- `resolution_status` (string): Current status (unresolved, user_resolved, auto_resolved)
|
||||
- `resolution_data` (object, optional): If resolved, includes resolution details
|
||||
- `resolved_by` (string, optional): User ID who resolved it
|
||||
- `resolved_at` (string, optional): When it was resolved
|
||||
- `created_at` (string): When conflict was detected
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
- 401: Unauthorized
|
||||
- 404: Conflict not found
|
||||
- 500: Internal server error
|
||||
|
||||
**Example Response:**
|
||||
```json
|
||||
{
|
||||
"koreader": {
|
||||
"source": "koreader",
|
||||
"timestamp": "2026-01-30T20:10:00Z",
|
||||
"data": {
|
||||
"percentage": 0.45,
|
||||
"epubcfi": "epubcfi(/6/4/2:15)",
|
||||
"chapter": 3
|
||||
"id": "conflict-uuid",
|
||||
"media_item_id": "book-uuid",
|
||||
"media_item_title": "Foundation",
|
||||
"conflict_type": "progress",
|
||||
"conflict_data": {
|
||||
"koreader": {
|
||||
"source": "koreader",
|
||||
"timestamp": "2026-01-30T20:10:00Z",
|
||||
"data": {
|
||||
"percentage": 0.45,
|
||||
"epubcfi": "epubcfi(/6/4/2:15)",
|
||||
"chapter": 3
|
||||
}
|
||||
},
|
||||
"kobo": {
|
||||
"source": "kobo",
|
||||
"timestamp": "2026-01-30T20:05:00Z",
|
||||
"data": {
|
||||
"percentage": 0.42,
|
||||
"location": "unknown"
|
||||
}
|
||||
}
|
||||
},
|
||||
"kobo": {
|
||||
"source": "kobo",
|
||||
"timestamp": "2026-01-30T20:05:00Z",
|
||||
"data": {
|
||||
"percentage": 0.42,
|
||||
"location": "unknown"
|
||||
}
|
||||
}
|
||||
"resolution_status": "unresolved",
|
||||
"created_at": "2026-01-30T20:10:00Z"
|
||||
}
|
||||
```
|
||||
|
||||
**Note:** Use this to get full details before resolving, showing exactly what data differs between sources.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user