This a set of mock APIs generated using some static data and Python/Flask. OpenAPI specification (also called Swagger specification) is also available in the repo. There are two endpoints,
/author: takes a mandatoryauthoridurl param to fetch anauthorobject (idandname)./author-article: takes a mandatoryauthoridurl param to fetch one article written by this as anarticleobject (id,titleandauthor_id).
The APIs and the OpenAPI specification have been packed using docker compose, which you'll need to run these services. If you don't have them installed on your machine, head to Docker's installation docs. The Python and Swagger services are hard coded to run on ports 5000 and 8080 respectively. If these ports are busy, please modify them in the docker-compose.yaml file.
-
Clone the repo:
git clone https://github.com/dsandip/python-mock-api.git cd python-mock-api -
Run the dockerized services -
docker compose up