A sample API that uses a Books store as an example
This server was generated by the [openapi-generator] (https://openapi-generator.tech) project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.
- API version: 0.0.1 For more information, please visit http://swagger.io
To run the server, follow these simple steps:
go run main.go
To run the server in a docker container
docker build --network=host -t books .
Once image is built use
docker run --rm -it books
To get list of books you need to execute:
curl -X GET http://localhost:8080/v1/api/books
To search with a specific criteria you can run the above command as example
curl -X POST --header "Content-Type: application/json" \
-d '{"Author": "Ralph Ellison"}' \
http://localhost:8080/v1/api/books/search