Small Shop API is a REST API to manage customer data for a small shop. It will work as the backend side for a CRM interface.
This is still a Work In Progress. Do not assume that the chosen approaches and their implementation are correct. This project is a first contact with Java, Spring and Spring Boot, so mistakes are around and there is room for improvement.
The API specification is written using version 3.0.3 of OAS (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md), the Open API Specification. The specification file in YAML format is located in docs/api/openapi.yml. To check the documentation:
Clone the project
git clone https://github.com/vmdef/smallshopapi.git
Go to the project directory
cd smallshopapi/smallshop
Built the app
./gradlew clean build
Start the server
java -jar build/libs/smallshop-0.0.1-SNAPSHOT.jar
Build an image with the following command
docker build -t myorg/smallshop .
Then we can run it by running the following command:
docker run -p 8080:8080 myorg/smallshop
Automated tests have not been fully implemented yet:(
Import the collection postmanCollection/SmallShopAPI.postman_collection.json. There are 3 folders:
The app uses an in-memory H2 database. You can launch H2 console at http://localhost:8080/h2-console. Change the default JDBC URL to jdbc:h2:mem:smallshop