v1.0.0OpenAPI 3.0.3

Bookstore API

Endpoints
7
Groups
3
Models
8

A small bookstore used as a test fixture.

Books

List books

get/books

operationId: books_list

Query parameters

pageinteger
≥ 1
Default: 1
genrestring
Values:"fiction""science""history"

Responses

array<Book>
object

Create book

post/books

operationId: books_store

Request body

required
titlestringrequired
min length 1max length 200
genrestring
Values:"fiction""science""history"
pricestring
pattern: ^\d+\.\d{2}$
Example: "12.50"

Responses

titlestringrequired
min length 1max length 200
genrestring
Values:"fiction""science""history"
pricestring
pattern: ^\d+\.\d{2}$
Example: "12.50"
created_atstring<date-time>
idintegerrequired
Authornullable
oneOf

Get book

get/books/{id}

operationId: books_show

Path parameters

idintegerrequired
Example: 42

Responses

titlestringrequired
min length 1max length 200
genrestring
Values:"fiction""science""history"
pricestring
pattern: ^\d+\.\d{2}$
Example: "12.50"
created_atstring<date-time>
idintegerrequired
Authornullable
oneOf

Delete book

delete/books/{id}

operationId: books_destroy

Path parameters

idintegerrequired
Example: 42

Responses

Update book

patch/books/{id}

operationId: books_update

Path parameters

idintegerrequired
Example: 42

Request body

titlestringrequired
min length 1max length 200
genrestring
Values:"fiction""science""history"
pricestring
pattern: ^\d+\.\d{2}$
Example: "12.50"

Responses

Authors

Get author

get/authors/{id}

Path parameters

idintegerrequired
Example: 42

Responses

idintegerrequired
namestringrequired
mentorAuthor↻ circular

Default

Health check

get/health

Responses

Models

Timestamps

created_atstring<date-time>

Author

idintegerrequired
namestringrequired
mentorAuthor↻ circular

BookInput

titlestringrequired
min length 1max length 200
genrestring
Values:"fiction""science""history"
pricestring
pattern: ^\d+\.\d{2}$
Example: "12.50"

Book

titlestringrequired
min length 1max length 200
genrestring
Values:"fiction""science""history"
pricestring
pattern: ^\d+\.\d{2}$
Example: "12.50"
created_atstring<date-time>
idintegerrequired
Authornullable
oneOf

Ebook

size_mbnumber

Paperback

pagesinteger

BookList

array<Book>
object

Error

array<object>