Skip to main content

Maintainability CircleCI

API Mocker config and test data generator based on Swagger/OpenAPI Spec.

Installation

$ pip install api-mocker-generator

Usage

usage: local_main.py [-h] --swagger SWAGGER --output OUTPUT [--verbose]

optional arguments:
  -h, --help         show this help message and exit
  --swagger SWAGGER  Location of swagger document. Could be HTTP endpoint or
                     local file system
  --output OUTPUT    Output directory for configuration and mocked responses
  --verbose

Example command

$ api-mocker-generator --swagger http://localhost:8080/api-docs --output ./out

Running locally during development

$ python local_main.py --swagger http://localhost:8080/api-docs --output ./out

Verbose debugging

To turn on verbose output for debugging, set the --verbose argument.

Publishing Updates to PyPi

For the maintainer, increment the version number in api_mocker_generator.py and run the following:

docker build -f ./Dockerfile.buildenv -t namuan/api_mocker_generator:build .
docker run --rm -it --entrypoint python namuan/api_mocker_generator:build setup.py publish

Enter the username and password for pypi.org repo when prompted

Release files for api-mocker-generator 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for api-mocker-generator 0.0.6
File Size Uploaded
api-mocker-generator-0.0.6.tar.gz 5.7 kB Details

Release files / api-mocker-generator-0.0.6.tar.gz

Download URL api-mocker-generator-0.0.6.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
32e1e8c9ff9d64f8617ee5c3d173a66278f2e0b2de8c66dd45c28d0e82eb4cb9
BLAKE2b-256 checksum
How to use checksums
a52642e013933cc97039b09c26bd8b12e8e404e034087cbfa41e63f27c947d18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/2.7.15

Release history Release notifications | RSS feed

This release

0.0.6 This release

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page