Skip to content
This repository was archived by the owner on Feb 1, 2026. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 1 addition & 84 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,87 +33,4 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/BookInput'
responses:
'201':
description: Book created successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Book'
'400':
description: Invalid input
'500':
description: Internal server error

/api/books/{id}:
get:
summary: Get a book by ID
description: Returns a single book by its ID
operationId: getBookById
parameters:
- name: id
in: path
required: true
description: ID of the book to retrieve
schema:
type: integer
format: int64
responses:
'200':
description: Book found
content:
application/json:
schema:
$ref: '#/components/schemas/Book'
'404':
description: Book not found
'500':
description: Internal server error

components:
schemas:
BookInput:
type: object
required:
- title
- author
properties:
title:
type: string
description: The title of the book
example: "The Great Gatsby"
author:
type: string
description: The author of the book
example: "F. Scott Fitzgerald"

Book:
type: object
properties:
ID:
type: integer
format: int64
description: The unique identifier of the book
example: 1
CreatedAt:
type: string
format: date-time
description: When the book was created
UpdatedAt:
type: string
format: date-time
description: When the book was last updated
DeletedAt:
type: string
format: date-time
nullable: true
description: When the book was deleted (soft delete)
title:
type: string
description: The title of the book
example: "The Great Gatsby"
author:
type: string
description: The author of the book
example: "F. Scott Fitzgerald"
... Hide contents