This project provides a BE with REST APIs that are documented using OpenAPI (Swagger). The OpenAPI documentation is available in both JSON and YAML formats.
To download the OpenAPI documentation in JSON format, you can access the following endpoint:
http://localhost:8080/v3/api-docs
You can download the JSON by sending a GET request to this endpoint. For example, using curl:
curl --location --output openapi.json 'http://localhost:8080/v3/api-docs'This will download the OpenAPI documentation in JSON format as openapi.json to your local machine.
If you prefer to download the OpenAPI documentation in YAML format, you can access the following endpoint:
http://localhost:8080/v3/api-docs.yaml
To download the YAML version, you can use the following curl command:
curl --location --output openapi.yaml 'http://localhost:8080/v3/api-docs.yaml'This will download the OpenAPI documentation in YAML format as openapi.yaml to your local machine.
- Java 17 or higher
- Maven
- Spring Boot >= 3.4.4
- PostgreSQL >=15
- RabbiMQ >= 4.08
To run this project locally, follow these steps:
-
Clone the repository:
git clone <repository-url>
-
Start PostgreSQL (port 5432).
-
Start RabbitMQ (port 5672).
-
Navigate to the project directory:
cd <project-directory>
-
Build and run the application using Maven (or Gradle):
For Maven:
./mvnw spring-boot:run
-
The API will be accessible at
http://localhost:8080.
Feel free to reach out if you have any issues accessing or downloading the Swagger documentation!
To check the code coverage, you can use JaCoCo. Follow these steps:
mvn clean test
mvn jacoco:report
View the coverage report:
After running, open:
target/site/jacoco/index.html