From c9b90ada1a3a8926ffec51d84097c9d69d799817 Mon Sep 17 00:00:00 2001 From: Akihiko Kusanagi Date: Thu, 7 May 2026 14:51:10 +0900 Subject: [PATCH] Initial commit --- .postman/resources.yaml | 9 +++++++++ .../Book API/.resources/definition.yaml | 8 ++++++++ postman/collections/Book API/API Root.request.yaml | 6 ++++++ .../Book API/Books/.resources/definition.yaml | 3 +++ .../Book API/Books/Create Book.request.yaml | 14 ++++++++++++++ .../Book API/Books/Delete Book.request.yaml | 6 ++++++ .../Book API/Books/Get Book.request.yaml | 13 +++++++++++++ .../Book API/Books/List Books.request.yaml | 6 ++++++ .../Book API/Books/Update Book.request.yaml | 14 ++++++++++++++ .../collections/Book API/Health Check.request.yaml | 6 ++++++ postman/globals/workspace.globals.yaml | 2 ++ 11 files changed, 87 insertions(+) create mode 100644 .postman/resources.yaml create mode 100644 postman/collections/Book API/.resources/definition.yaml create mode 100644 postman/collections/Book API/API Root.request.yaml create mode 100644 postman/collections/Book API/Books/.resources/definition.yaml create mode 100644 postman/collections/Book API/Books/Create Book.request.yaml create mode 100644 postman/collections/Book API/Books/Delete Book.request.yaml create mode 100644 postman/collections/Book API/Books/Get Book.request.yaml create mode 100644 postman/collections/Book API/Books/List Books.request.yaml create mode 100644 postman/collections/Book API/Books/Update Book.request.yaml create mode 100644 postman/collections/Book API/Health Check.request.yaml create mode 100644 postman/globals/workspace.globals.yaml diff --git a/.postman/resources.yaml b/.postman/resources.yaml new file mode 100644 index 0000000..2dbf83d --- /dev/null +++ b/.postman/resources.yaml @@ -0,0 +1,9 @@ +# Use this workspace to collaborate +workspace: + id: ebc30ed3-3e0b-4119-8115-f633c2b96c34 + +# All resources in the `postman/` folder are automatically registered in Local View. +# Point to additional files outside the `postman/` folder to register them individually. Example: +#localResources: +# collections: +# - ../tests/E2E Test Collection/ diff --git a/postman/collections/Book API/.resources/definition.yaml b/postman/collections/Book API/.resources/definition.yaml new file mode 100644 index 0000000..bd706d3 --- /dev/null +++ b/postman/collections/Book API/.resources/definition.yaml @@ -0,0 +1,8 @@ +$kind: collection +name: Book API +description: 'CRUD API for managing books. Base URL: http://localhost:3000' +variables: + - key: baseUrl + value: 'http://localhost:3000' + - key: bookId + value: '' diff --git a/postman/collections/Book API/API Root.request.yaml b/postman/collections/Book API/API Root.request.yaml new file mode 100644 index 0000000..7a067cf --- /dev/null +++ b/postman/collections/Book API/API Root.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: API Root +method: GET +url: '{{baseUrl}}/' +description: 'Get API info and available routes' +order: 2000 diff --git a/postman/collections/Book API/Books/.resources/definition.yaml b/postman/collections/Book API/Books/.resources/definition.yaml new file mode 100644 index 0000000..8acd608 --- /dev/null +++ b/postman/collections/Book API/Books/.resources/definition.yaml @@ -0,0 +1,3 @@ +$kind: collection +name: Books +description: 'Book CRUD endpoints' diff --git a/postman/collections/Book API/Books/Create Book.request.yaml b/postman/collections/Book API/Books/Create Book.request.yaml new file mode 100644 index 0000000..cf2fbdf --- /dev/null +++ b/postman/collections/Book API/Books/Create Book.request.yaml @@ -0,0 +1,14 @@ +$kind: http-request +name: Create Book +method: POST +url: '{{baseUrl}}/api/v1/books' +description: 'Create a new book. Required fields: title (string), author (string). Optional: year (integer).' +order: 3000 +body: + type: json + content: |- + { + "title": "The Great Gatsby", + "author": "F. Scott Fitzgerald", + "year": 1925 + } diff --git a/postman/collections/Book API/Books/Delete Book.request.yaml b/postman/collections/Book API/Books/Delete Book.request.yaml new file mode 100644 index 0000000..2b89577 --- /dev/null +++ b/postman/collections/Book API/Books/Delete Book.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: Delete Book +method: DELETE +url: '{{baseUrl}}/api/v1/books/{{bookId}}' +description: 'Delete a book by ID' +order: 5000 diff --git a/postman/collections/Book API/Books/Get Book.request.yaml b/postman/collections/Book API/Books/Get Book.request.yaml new file mode 100644 index 0000000..ebe8c22 --- /dev/null +++ b/postman/collections/Book API/Books/Get Book.request.yaml @@ -0,0 +1,13 @@ +$kind: http-request +name: Get Book +method: GET +url: "{{baseUrl}}/api/v1/books/{{bookId}}" +description: Retrieve a single book by ID +scripts: + - type: afterResponse + code: |- + pm.test("Status code is 200", function () { + pm.response.to.have.status(200); + }); + language: text/javascript +order: 2000 diff --git a/postman/collections/Book API/Books/List Books.request.yaml b/postman/collections/Book API/Books/List Books.request.yaml new file mode 100644 index 0000000..02432f8 --- /dev/null +++ b/postman/collections/Book API/Books/List Books.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: List Books +method: GET +url: '{{baseUrl}}/api/v1/books' +description: 'Retrieve all books' +order: 1000 diff --git a/postman/collections/Book API/Books/Update Book.request.yaml b/postman/collections/Book API/Books/Update Book.request.yaml new file mode 100644 index 0000000..289ca10 --- /dev/null +++ b/postman/collections/Book API/Books/Update Book.request.yaml @@ -0,0 +1,14 @@ +$kind: http-request +name: Update Book +method: PUT +url: '{{baseUrl}}/api/v1/books/{{bookId}}' +description: 'Update an existing book by ID. Fields: title, author, year (all optional in update).' +order: 4000 +body: + type: json + content: |- + { + "title": "The Great Gatsby (Updated)", + "author": "F. Scott Fitzgerald", + "year": 1925 + } diff --git a/postman/collections/Book API/Health Check.request.yaml b/postman/collections/Book API/Health Check.request.yaml new file mode 100644 index 0000000..80edf2e --- /dev/null +++ b/postman/collections/Book API/Health Check.request.yaml @@ -0,0 +1,6 @@ +$kind: http-request +name: Health Check +method: GET +url: '{{baseUrl}}/health' +description: 'Check if the API server is running' +order: 1000 diff --git a/postman/globals/workspace.globals.yaml b/postman/globals/workspace.globals.yaml new file mode 100644 index 0000000..e96c6d6 --- /dev/null +++ b/postman/globals/workspace.globals.yaml @@ -0,0 +1,2 @@ +name: Globals +values: []