Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/npalm/catalog-service
https://github.com/npalm/catalog-service
Last synced: 25 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/npalm/catalog-service
- Owner: npalm
- Created: 2022-01-16T13:24:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-29T15:17:17.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T22:03:58.736Z (about 1 month ago)
- Language: Java
- Size: 131 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Catalog Service
## REST API
| Endpoint | Method | Req. body | Status | Resp. body | Description |
|:---------------:|:--------:|:----------:|:------:|:--------------:|:-------------------------------|
| `/books` | `GET` | | 200 | Book[] | Get all the books in the catalog. |
| `/books` | `POST` | Book | 201 | Book | Add a new book to the catalog. |
| | | | 422 | | A book with the same ISBN already exists. |
| `/books/{isbn}` | `GET` | | 200 | Book | Get the book with the given ISBN. |
| | | | 404 | | No book with the given ISBN exists. |
| `/books/{isbn}` | `PUT` | Book | 200 | Book | Update the book with the given ISBN. |
| | | | 201 | Book | Create a book with the given ISBN. |
| `/books/{isbn}` | `DELETE` | | 204 | | Delete the book with the given ISBN. |
| | | | 404 | | No book with the given ISBN exists. |## Useful Commands
| Gradle Command | Description |
|:---------------------------|:----------------------------------------------|
| `./gradlew bootRun` | Run the application. |
| `./gradlew build` | Build the application. |
| `./gradlew test` | Run tests. |
| `./gradlew bootJar` | Package the application as a JAR. |
| `./gradlew bootBuildImage` | Package the application as a container image. |After building the application, you can also run it from the Java CLI:
```bash
java -jar build/libs/catalog-service-.jar
```