This project demonstrates how to create a dynamic API mocker using Spring Boot and OpenAPI specifications.
The OpenAPI Mocker project showcases how to build a Spring Boot application that dynamically handles API requests based on OpenAPI specifications. It also demonstrates how to generate fake data for responses using the Faker library.
- Java 11 or later
- Maven
-
Clone the repository:
git clone https://github.com/your-username/openapi-mocker.git cd openapi-mocker
mvn clean install
mvn spring-boot:run
The application will start and listen on http://localhost:8080.
The application dynamically handles API requests based on the provided OpenAPI specifications. You can send requests to paths defined in the OpenAPI document, and the application will respond accordingly.
The application uses the Faker library to generate fake data for responses. It reads the OpenAPI schema and generates appropriate fake data based on the schema's properties.
Contributions are welcome! Feel free to open issues and submit pull requests.