This is a Java based implementation of a mock server designed to simulate requests and responses as specified in the ZIMRA FDMS API documentation: https://fdmsapitest.zimra.co.zw/swagger/index.html
Note
For a Typescript based implementation, kindly refer to the repo by takumade at takumade/zimra-fdms-mock-server
- Java 21
- Maven
- SpringBoot
- Docker
-
Clone the repository:
git clone https://github.com/bruce-mig/zimra-fdms-mock-server-java.git cd zimra-fdms-mock-server-java
-
Build the application jar:
- Using maven:
./mvnw clean package
- Test the application:
- Using maven:
./mvnw test
- Start the server:
- Using maven:
./mvnw spring-boot:run
- Using java runtime:
java -jar target/zimra-fdms-mock-server-java-1.0.0.jar
- Using maven:
NB: The server will start running on http://localhost:3000
.
The Swagger UI is at http://localhost:3000/swagger-ui/index.html
To run the ZIMRA FDMS Mock Server using Docker, run the following command:
docker run -p 3000:3000 bmigeri/zimra-fdms-mock-server-java:latest
The server will be accessible at http://localhost:3000
.
The Swagger UI is at http://localhost:3000/swagger-ui/index.html
Note
This mock server is particularly useful for developers who do not have immediate access to a fiscalized ID. However, please note that it is recommended to test with the original server whenever possible, as the responses may differ from those provided by this mock implementation.
This project is open source and contributions are welcome. Please fork the repository and submit pull requests.
Note
Given that it's a mock server, contributions are most welcome in the form of bug fixes and realism enhancements.