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:
@@ -1,34 +1,70 @@
|
||||
{
|
||||
"meta": {
|
||||
"name": "Bulk Link Unlinked Books",
|
||||
"type": "http"
|
||||
},
|
||||
"req": {
|
||||
"url": "{{baseUrl}}/sync/bulk-link-books",
|
||||
"method": "POST",
|
||||
"header": [
|
||||
meta {
|
||||
name: Bulk Link Unlinked Books
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{baseUrl}}/sync/bulk-link-books
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
headers {
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{authToken}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"links": [
|
||||
{
|
||||
"key": "Content-Type",
|
||||
"value": "application/json"
|
||||
"unlinked_book_id": "{{unlinkedBookId1}}",
|
||||
"media_item_id": "{{mediaItemId1}}",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"key": "Authorization",
|
||||
"value": "Bearer {{authToken}}"
|
||||
"unlinked_book_id": "{{unlinkedBookId2}}",
|
||||
"media_item_id": "{{mediaItemId2}}",
|
||||
"confidence_score": 0.9
|
||||
}
|
||||
],
|
||||
"body": {
|
||||
"links": [
|
||||
{
|
||||
"unlinked_book_id": "{{unlinkedBookId1}}",
|
||||
"media_item_id": "{{mediaItemId1}}",
|
||||
"confidence_score": 1.0
|
||||
},
|
||||
{
|
||||
"unlinked_book_id": "{{unlinkedBookId2}}",
|
||||
"media_item_id": "{{mediaItemId2}}",
|
||||
"confidence_score": 0.9
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
timeout: 0
|
||||
}
|
||||
|
||||
docs {
|
||||
## Bulk Link Unlinked Books
|
||||
|
||||
Links multiple unlinked books to media items in a single request.
|
||||
|
||||
**Method:** POST
|
||||
|
||||
**Endpoint:** /sync/bulk-link-books
|
||||
|
||||
**Authentication:** Bearer token
|
||||
|
||||
**Request Body:**
|
||||
- `links` (array): Array of link objects
|
||||
- `unlinked_book_id` (string): Unlinked book UUID
|
||||
- `media_item_id` (string): Media item UUID to link to
|
||||
- `confidence_score` (number): Match confidence (0-1)
|
||||
|
||||
**Response:**
|
||||
- `results` (array): Results for each link attempt
|
||||
- `total` (number): Total number of links processed
|
||||
- `success` (number): Number of successful links
|
||||
- `failed` (number): Number of failed links
|
||||
|
||||
**Status Codes:**
|
||||
- 200: Success
|
||||
- 400: Invalid request data
|
||||
- 401: Unauthorized
|
||||
- 500: Internal server error
|
||||
|
||||
**Note:** Use this endpoint after reviewing suggestions from the Get Unlinked Book Suggestions endpoint.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user