This project allows users to run Open Banking Mocked Apis. This mocks are made with OpenAPI Mock Server.
Options to run:
- 1 - Docker based on local machines or;
- 2 - PWD - Play with Docker*.
*PWD is a Docker playground which allows users to run Docker commands in a matter of seconds.
- Docker
- Docker Compose
- PWD - Play With Docker (It's alternative to expose the mock through internet running in the cloud).
-
Download and install Docker and Docker Compose.
-
Fork this repository on Github.
-
Clone your forked repository (not our original one) to your hard drive with
git clone https://github.com/YOURUSERNAME/mock-api.git
- Access directory mock-api.
cd mock-api
- Run the command bellow to start all containers. We have a container for each OpenBankingBrasil API.
docker-compose up
This command will download the images and run the containers with de swagger versions contained in the .env file. By the default this versions is the last published version.
If you want to run all the container with a specific version, please edit the file ".env"
- Alternatively is possible to run a docker container individually with the comand below:
docker run -p [PORT:PORT] openbankingbrasil/admin-api:[VERSAO]
[PORT]: Each API-MOCK listen on a specific port as follows:
- ADMIN_API: "7001"
- CHANNELS_API: "7002"
- COMMON_API: "7003"
- PRODUCTS_SERVICES_API: "7004"
[VERSION]: The version of Open Banking Specification.
Important: This field is required, today we´re not publishing a tag 'latest'.
A example follows below:
docker run -p 7001:7001 openbankingbrasil/admin-api:v1.0.0-rc5.3
- Check if mock running typing this URL in your web browser:
http://localhost:7001/open-banking/admin/v1/metrics
Alternatively it's possible check if run using this command to test:
curl http://localhost:7001/open-banking/admin/v1/metrics
If ok, you will see the mocked response:
- Access PWD and start a new session with your Docker Hub credentials.
- Once your session is active click on "Add New Instance".
- A new instance will start with a Docker Engine ready to accept commands.
- Now run the comand below:
docker run -p 7001:7001 openbankingbrasil/admin-api:v1.0.0-rc5.3
Docker will start to download the images e run the container. At the end, the console will show the message "Starting server on port 7001".
- Now you can click on the port 7001 highlighted.
- So, you will see a white screen with this message.
- Complement the url with the path of one of the API. And you will see the mocked response.
- All the API paths can be found on the Open Banking Developer Portal