Skip to content

Commit c600d08

Browse files
committed
initi commit of code generated client
0 parents  commit c600d08

File tree

94 files changed

+7361
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+7361
-0
lines changed

Diff for: .gitignore

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
venv/
48+
.python-version
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
57+
# Sphinx documentation
58+
docs/_build/
59+
60+
# PyBuilder
61+
target/
62+
63+
#Ipython Notebook
64+
.ipynb_checkpoints

Diff for: .openapi-generator-ignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

Diff for: .openapi-generator/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.3.1

Diff for: .travis.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ref: https://docs.travis-ci.com/user/languages/python
2+
language: python
3+
python:
4+
- "2.7"
5+
- "3.2"
6+
- "3.3"
7+
- "3.4"
8+
- "3.5"
9+
#- "3.5-dev" # 3.5 development branch
10+
#- "nightly" # points to the latest development branch e.g. 3.6-dev
11+
# command to install dependencies
12+
install: "pip install -r requirements.txt"
13+
# command to run tests
14+
script: nosetests

Diff for: README.md

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# mockserver-client
2+
MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby and a simple REST API (as shown below). MockServer Proxy is a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). Both MockServer and the MockServer Proxy record all received requests so that it is possible to verify exactly what requests have been sent by the system under test.
3+
4+
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
5+
6+
- API version: 5.3.0
7+
- Package version: 5.3.0
8+
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
9+
10+
## Requirements.
11+
12+
Python 2.7 and 3.4+
13+
14+
## Installation & Usage
15+
### pip install
16+
17+
If the python package is hosted on Github, you can install directly from Github
18+
19+
```sh
20+
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
21+
```
22+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
23+
24+
Then import the package:
25+
```python
26+
import mockserver
27+
```
28+
29+
### Setuptools
30+
31+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
32+
33+
```sh
34+
python setup.py install --user
35+
```
36+
(or `sudo python setup.py install` to install the package for all users)
37+
38+
Then import the package:
39+
```python
40+
import mockserver
41+
```
42+
43+
## Getting Started
44+
45+
Please follow the [installation procedure](#installation--usage) and then run the following:
46+
47+
```python
48+
from __future__ import print_function
49+
import time
50+
import mockserver
51+
from mockserver.rest import ApiException
52+
from pprint import pprint
53+
54+
# create an instance of the API class
55+
api_instance = mockserver.ControlApi(mockserver.ApiClient(configuration))
56+
ports = mockserver.Ports() # Ports | list of ports to bind to, where 0 indicates dynamically bind to any available port
57+
58+
try:
59+
# bind additional listening ports
60+
api_response = api_instance.bind_put(ports)
61+
pprint(api_response)
62+
except ApiException as e:
63+
print("Exception when calling ControlApi->bind_put: %s\n" % e)
64+
65+
```
66+
67+
## Documentation for API Endpoints
68+
69+
All URIs are relative to *http://localhost:1080*
70+
71+
Class | Method | HTTP request | Description
72+
------------ | ------------- | ------------- | -------------
73+
*ControlApi* | [**bind_put**](docs/ControlApi.md#bind_put) | **PUT** /bind | bind additional listening ports
74+
*ControlApi* | [**clear_put**](docs/ControlApi.md#clear_put) | **PUT** /clear | clears expectations and recorded requests that match the request matcher
75+
*ControlApi* | [**reset_put**](docs/ControlApi.md#reset_put) | **PUT** /reset | clears all expectations and recorded requests
76+
*ControlApi* | [**retrieve_put**](docs/ControlApi.md#retrieve_put) | **PUT** /retrieve | retrieve recorded requests, active expectations, recorded expectations or log messages
77+
*ControlApi* | [**status_put**](docs/ControlApi.md#status_put) | **PUT** /status | return listening ports
78+
*ControlApi* | [**stop_put**](docs/ControlApi.md#stop_put) | **PUT** /stop | stop running process
79+
*ExpectationApi* | [**expectation_put**](docs/ExpectationApi.md#expectation_put) | **PUT** /expectation | create expectation
80+
*VerifyApi* | [**verify_put**](docs/VerifyApi.md#verify_put) | **PUT** /verify | verify a request has been received a specific number of times
81+
*VerifyApi* | [**verify_sequence_put**](docs/VerifyApi.md#verify_sequence_put) | **PUT** /verifySequence | verify a sequence of request has been received in the specific order
82+
83+
84+
## Documentation For Models
85+
86+
- [Body](docs/Body.md)
87+
- [BodyWithContentType](docs/BodyWithContentType.md)
88+
- [ConnectionOptions](docs/ConnectionOptions.md)
89+
- [Delay](docs/Delay.md)
90+
- [Expectation](docs/Expectation.md)
91+
- [Expectations](docs/Expectations.md)
92+
- [HttpClassCallback](docs/HttpClassCallback.md)
93+
- [HttpError](docs/HttpError.md)
94+
- [HttpForward](docs/HttpForward.md)
95+
- [HttpObjectCallback](docs/HttpObjectCallback.md)
96+
- [HttpOverrideForwardedRequest](docs/HttpOverrideForwardedRequest.md)
97+
- [HttpRequest](docs/HttpRequest.md)
98+
- [HttpResponse](docs/HttpResponse.md)
99+
- [HttpTemplate](docs/HttpTemplate.md)
100+
- [KeyToMultiValue](docs/KeyToMultiValue.md)
101+
- [KeyToValue](docs/KeyToValue.md)
102+
- [Ports](docs/Ports.md)
103+
- [TimeToLive](docs/TimeToLive.md)
104+
- [Times](docs/Times.md)
105+
- [Verification](docs/Verification.md)
106+
- [VerificationSequence](docs/VerificationSequence.md)
107+
- [VerificationTimes](docs/VerificationTimes.md)
108+
109+
110+
## Documentation For Authorization
111+
112+
All endpoints do not require authorization.
113+
114+
115+
## Author
116+
117+
118+
119+

Diff for: code-generate.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
brew install openapi-generator
2+
3+
openapi-generator generate -i https://raw.githubusercontent.com/jamesdbloom/mockserver/master/mockserver-core/src/main/resources/org/mockserver/openapi/mock-server-openapi-embedded-model.yaml --config code-generation-config.json -g python -o .

Diff for: code-generation-config.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"projectName": "mockserver-client",
3+
"packageName": "mockserver",
4+
"pythonPackageName": "mockserver",
5+
"packageVersion": "5.3.0"
6+
}

Diff for: docs/Body.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Body
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8+
9+

Diff for: docs/BodyWithContentType.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# BodyWithContentType
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
7+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
8+
9+

Diff for: docs/ConnectionOptions.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ConnectionOptions
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**close_socket** | **bool** | | [optional]
7+
**content_length_header_override** | **int** | | [optional]
8+
**suppress_content_length_header** | **bool** | | [optional]
9+
**suppress_connection_header** | **bool** | | [optional]
10+
**keep_alive_override** | **bool** | | [optional]
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+

0 commit comments

Comments
 (0)