mockserver-client-2 5.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +8 -0
- data/README.md +120 -0
- data/Rakefile +10 -0
- data/code-generate.md +3 -0
- data/code-generation-config.json +10 -0
- data/docs/Body.md +7 -0
- data/docs/BodyWithContentType.md +7 -0
- data/docs/ConnectionOptions.md +12 -0
- data/docs/ControlApi.md +269 -0
- data/docs/Delay.md +9 -0
- data/docs/Expectation.md +7 -0
- data/docs/ExpectationApi.md +51 -0
- data/docs/Expectations.md +7 -0
- data/docs/HttpClassCallback.md +8 -0
- data/docs/HttpError.md +10 -0
- data/docs/HttpForward.md +11 -0
- data/docs/HttpObjectCallback.md +8 -0
- data/docs/HttpOverrideForwardedRequest.md +9 -0
- data/docs/HttpRequest.md +15 -0
- data/docs/HttpResponse.md +14 -0
- data/docs/HttpTemplate.md +10 -0
- data/docs/KeyToMultiValue.md +7 -0
- data/docs/KeyToValue.md +7 -0
- data/docs/Ports.md +8 -0
- data/docs/TimeToLive.md +10 -0
- data/docs/Times.md +9 -0
- data/docs/Verification.md +9 -0
- data/docs/VerificationSequence.md +8 -0
- data/docs/VerificationTimes.md +9 -0
- data/docs/VerifyApi.md +94 -0
- data/lib/mockserver-client/api/control_api.rb +316 -0
- data/lib/mockserver-client/api/expectation_api.rb +73 -0
- data/lib/mockserver-client/api/verify_api.rb +127 -0
- data/lib/mockserver-client/api_client.rb +388 -0
- data/lib/mockserver-client/api_error.rb +38 -0
- data/lib/mockserver-client/configuration.rb +202 -0
- data/lib/mockserver-client/models/body.rb +174 -0
- data/lib/mockserver-client/models/body_with_content_type.rb +174 -0
- data/lib/mockserver-client/models/connection_options.rb +219 -0
- data/lib/mockserver-client/models/delay.rb +192 -0
- data/lib/mockserver-client/models/expectation.rb +174 -0
- data/lib/mockserver-client/models/expectations.rb +174 -0
- data/lib/mockserver-client/models/http_class_callback.rb +183 -0
- data/lib/mockserver-client/models/http_error.rb +201 -0
- data/lib/mockserver-client/models/http_forward.rb +244 -0
- data/lib/mockserver-client/models/http_object_callback.rb +183 -0
- data/lib/mockserver-client/models/http_override_forwarded_request.rb +192 -0
- data/lib/mockserver-client/models/http_request.rb +246 -0
- data/lib/mockserver-client/models/http_response.rb +237 -0
- data/lib/mockserver-client/models/http_template.rb +235 -0
- data/lib/mockserver-client/models/key_to_multi_value.rb +174 -0
- data/lib/mockserver-client/models/key_to_value.rb +174 -0
- data/lib/mockserver-client/models/ports.rb +185 -0
- data/lib/mockserver-client/models/time_to_live.rb +235 -0
- data/lib/mockserver-client/models/times.rb +192 -0
- data/lib/mockserver-client/models/verification.rb +192 -0
- data/lib/mockserver-client/models/verification_sequence.rb +185 -0
- data/lib/mockserver-client/models/verification_times.rb +192 -0
- data/lib/mockserver-client/version.rb +15 -0
- data/lib/mockserver-client.rb +64 -0
- data/mockserver-client.gemspec +45 -0
- data/spec/api/control_api_spec.rb +102 -0
- data/spec/api/expectation_api_spec.rb +46 -0
- data/spec/api/verify_api_spec.rb +57 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/body_spec.rb +35 -0
- data/spec/models/body_with_content_type_spec.rb +35 -0
- data/spec/models/connection_options_spec.rb +65 -0
- data/spec/models/delay_spec.rb +47 -0
- data/spec/models/expectation_spec.rb +35 -0
- data/spec/models/expectations_spec.rb +35 -0
- data/spec/models/http_class_callback_spec.rb +41 -0
- data/spec/models/http_error_spec.rb +53 -0
- data/spec/models/http_forward_spec.rb +63 -0
- data/spec/models/http_object_callback_spec.rb +41 -0
- data/spec/models/http_override_forwarded_request_spec.rb +47 -0
- data/spec/models/http_request_spec.rb +83 -0
- data/spec/models/http_response_spec.rb +77 -0
- data/spec/models/http_template_spec.rb +57 -0
- data/spec/models/key_to_multi_value_spec.rb +35 -0
- data/spec/models/key_to_value_spec.rb +35 -0
- data/spec/models/ports_spec.rb +41 -0
- data/spec/models/time_to_live_spec.rb +57 -0
- data/spec/models/times_spec.rb +47 -0
- data/spec/models/verification_sequence_spec.rb +41 -0
- data/spec/models/verification_spec.rb +47 -0
- data/spec/models/verification_times_spec.rb +47 -0
- data/spec/spec_helper.rb +111 -0
- metadata +347 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4fc5945edb1033b86201eb7434cac5800f2f1460bfa77182eb63dce07327d165
|
4
|
+
data.tar.gz: 3570a137ad228f6c31a13d8c6639c7aba6d8f48a305f291a461774f11ac89a41
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3f458ea524edb3bf6d1714d3584817211c75f57ef4064fca638e29f7fd8cae8ca39ab1c79bfa41ca2e5276196d36280bd2608cbcc1b0e27ee0eef8f491027505
|
7
|
+
data.tar.gz: b19729faeaceca8986ebc735313d83a5e445aa93dba8c9d33957f750ef49eee6a037749dea585dc1281e213331ecef40fbad690dd66b1c248f4c5203048e24fc
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
# mockserver-client
|
2
|
+
|
3
|
+
MockServer - the Ruby gem for the Mock Server API
|
4
|
+
|
5
|
+
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).
|
6
|
+
|
7
|
+
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).
|
8
|
+
|
9
|
+
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.
|
10
|
+
|
11
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
12
|
+
|
13
|
+
- API version: 5.3.0
|
14
|
+
- Package version: 5.3.0
|
15
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
16
|
+
|
17
|
+
## Installation
|
18
|
+
|
19
|
+
### Build a gem
|
20
|
+
|
21
|
+
To build the Ruby code into a gem:
|
22
|
+
|
23
|
+
```shell
|
24
|
+
gem build mockserver-client.gemspec
|
25
|
+
```
|
26
|
+
|
27
|
+
Then either install the gem locally:
|
28
|
+
|
29
|
+
```shell
|
30
|
+
gem install ./mockserver-client-5.3.0.gem
|
31
|
+
```
|
32
|
+
(for development, run `gem install --dev ./mockserver-client-5.3.0.gem` to install the development dependencies)
|
33
|
+
|
34
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
35
|
+
|
36
|
+
Finally add this to the Gemfile:
|
37
|
+
|
38
|
+
gem 'mockserver-client', '~> 5.3.0'
|
39
|
+
|
40
|
+
### Install from Git
|
41
|
+
|
42
|
+
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
|
43
|
+
|
44
|
+
gem 'mockserver-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
45
|
+
|
46
|
+
### Include the Ruby code directly
|
47
|
+
|
48
|
+
Include the Ruby code directly using `-I` as follows:
|
49
|
+
|
50
|
+
```shell
|
51
|
+
ruby -Ilib script.rb
|
52
|
+
```
|
53
|
+
|
54
|
+
## Getting Started
|
55
|
+
|
56
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
57
|
+
```ruby
|
58
|
+
# Load the gem
|
59
|
+
require 'mockserver-client'
|
60
|
+
|
61
|
+
api_instance = MockServer::ControlApi.new
|
62
|
+
ports = MockServer::Ports.new # Ports | list of ports to bind to, where 0 indicates dynamically bind to any available port
|
63
|
+
|
64
|
+
begin
|
65
|
+
#bind additional listening ports
|
66
|
+
result = api_instance.bind_put(ports)
|
67
|
+
p result
|
68
|
+
rescue MockServer::ApiError => e
|
69
|
+
puts "Exception when calling ControlApi->bind_put: #{e}"
|
70
|
+
end
|
71
|
+
|
72
|
+
```
|
73
|
+
|
74
|
+
## Documentation for API Endpoints
|
75
|
+
|
76
|
+
All URIs are relative to *http://localhost:1080*
|
77
|
+
|
78
|
+
Class | Method | HTTP request | Description
|
79
|
+
------------ | ------------- | ------------- | -------------
|
80
|
+
*MockServer::ControlApi* | [**bind_put**](docs/ControlApi.md#bind_put) | **PUT** /bind | bind additional listening ports
|
81
|
+
*MockServer::ControlApi* | [**clear_put**](docs/ControlApi.md#clear_put) | **PUT** /clear | clears expectations and recorded requests that match the request matcher
|
82
|
+
*MockServer::ControlApi* | [**reset_put**](docs/ControlApi.md#reset_put) | **PUT** /reset | clears all expectations and recorded requests
|
83
|
+
*MockServer::ControlApi* | [**retrieve_put**](docs/ControlApi.md#retrieve_put) | **PUT** /retrieve | retrieve recorded requests, active expectations, recorded expectations or log messages
|
84
|
+
*MockServer::ControlApi* | [**status_put**](docs/ControlApi.md#status_put) | **PUT** /status | return listening ports
|
85
|
+
*MockServer::ControlApi* | [**stop_put**](docs/ControlApi.md#stop_put) | **PUT** /stop | stop running process
|
86
|
+
*MockServer::ExpectationApi* | [**expectation_put**](docs/ExpectationApi.md#expectation_put) | **PUT** /expectation | create expectation
|
87
|
+
*MockServer::VerifyApi* | [**verify_put**](docs/VerifyApi.md#verify_put) | **PUT** /verify | verify a request has been received a specific number of times
|
88
|
+
*MockServer::VerifyApi* | [**verify_sequence_put**](docs/VerifyApi.md#verify_sequence_put) | **PUT** /verifySequence | verify a sequence of request has been received in the specific order
|
89
|
+
|
90
|
+
|
91
|
+
## Documentation for Models
|
92
|
+
|
93
|
+
- [MockServer::Body](docs/Body.md)
|
94
|
+
- [MockServer::BodyWithContentType](docs/BodyWithContentType.md)
|
95
|
+
- [MockServer::ConnectionOptions](docs/ConnectionOptions.md)
|
96
|
+
- [MockServer::Delay](docs/Delay.md)
|
97
|
+
- [MockServer::Expectation](docs/Expectation.md)
|
98
|
+
- [MockServer::Expectations](docs/Expectations.md)
|
99
|
+
- [MockServer::HttpClassCallback](docs/HttpClassCallback.md)
|
100
|
+
- [MockServer::HttpError](docs/HttpError.md)
|
101
|
+
- [MockServer::HttpForward](docs/HttpForward.md)
|
102
|
+
- [MockServer::HttpObjectCallback](docs/HttpObjectCallback.md)
|
103
|
+
- [MockServer::HttpOverrideForwardedRequest](docs/HttpOverrideForwardedRequest.md)
|
104
|
+
- [MockServer::HttpRequest](docs/HttpRequest.md)
|
105
|
+
- [MockServer::HttpResponse](docs/HttpResponse.md)
|
106
|
+
- [MockServer::HttpTemplate](docs/HttpTemplate.md)
|
107
|
+
- [MockServer::KeyToMultiValue](docs/KeyToMultiValue.md)
|
108
|
+
- [MockServer::KeyToValue](docs/KeyToValue.md)
|
109
|
+
- [MockServer::Ports](docs/Ports.md)
|
110
|
+
- [MockServer::TimeToLive](docs/TimeToLive.md)
|
111
|
+
- [MockServer::Times](docs/Times.md)
|
112
|
+
- [MockServer::Verification](docs/Verification.md)
|
113
|
+
- [MockServer::VerificationSequence](docs/VerificationSequence.md)
|
114
|
+
- [MockServer::VerificationTimes](docs/VerificationTimes.md)
|
115
|
+
|
116
|
+
|
117
|
+
## Documentation for Authorization
|
118
|
+
|
119
|
+
All endpoints do not require authorization.
|
120
|
+
|
data/Rakefile
ADDED
data/code-generate.md
ADDED
@@ -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 ruby -o .
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"gemName": "mockserver-client",
|
3
|
+
"moduleName": "MockServer",
|
4
|
+
"gemVersion": "5.3.0",
|
5
|
+
"gemLicense": "Apache-2.0",
|
6
|
+
"gemRequiredRubyVersion": ">= 2.0",
|
7
|
+
"gemHomepage": "https://www.mock-server.com",
|
8
|
+
"gemAuthor": "James D Bloom",
|
9
|
+
"gemAuthorEmail": "jamesdbloom@gmail.com"
|
10
|
+
}
|
data/docs/Body.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# MockServer::ConnectionOptions
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**close_socket** | **BOOLEAN** | | [optional]
|
7
|
+
**content_length_header_override** | **Integer** | | [optional]
|
8
|
+
**suppress_content_length_header** | **BOOLEAN** | | [optional]
|
9
|
+
**suppress_connection_header** | **BOOLEAN** | | [optional]
|
10
|
+
**keep_alive_override** | **BOOLEAN** | | [optional]
|
11
|
+
|
12
|
+
|
data/docs/ControlApi.md
ADDED
@@ -0,0 +1,269 @@
|
|
1
|
+
# MockServer::ControlApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:1080*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**bind_put**](ControlApi.md#bind_put) | **PUT** /bind | bind additional listening ports
|
8
|
+
[**clear_put**](ControlApi.md#clear_put) | **PUT** /clear | clears expectations and recorded requests that match the request matcher
|
9
|
+
[**reset_put**](ControlApi.md#reset_put) | **PUT** /reset | clears all expectations and recorded requests
|
10
|
+
[**retrieve_put**](ControlApi.md#retrieve_put) | **PUT** /retrieve | retrieve recorded requests, active expectations, recorded expectations or log messages
|
11
|
+
[**status_put**](ControlApi.md#status_put) | **PUT** /status | return listening ports
|
12
|
+
[**stop_put**](ControlApi.md#stop_put) | **PUT** /stop | stop running process
|
13
|
+
|
14
|
+
|
15
|
+
# **bind_put**
|
16
|
+
> Ports bind_put(ports)
|
17
|
+
|
18
|
+
bind additional listening ports
|
19
|
+
|
20
|
+
only supported on Netty version
|
21
|
+
|
22
|
+
### Example
|
23
|
+
```ruby
|
24
|
+
# load the gem
|
25
|
+
require 'mockserver-client'
|
26
|
+
|
27
|
+
api_instance = MockServer::ControlApi.new
|
28
|
+
ports = MockServer::Ports.new # Ports | list of ports to bind to, where 0 indicates dynamically bind to any available port
|
29
|
+
|
30
|
+
begin
|
31
|
+
#bind additional listening ports
|
32
|
+
result = api_instance.bind_put(ports)
|
33
|
+
p result
|
34
|
+
rescue MockServer::ApiError => e
|
35
|
+
puts "Exception when calling ControlApi->bind_put: #{e}"
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
### Parameters
|
40
|
+
|
41
|
+
Name | Type | Description | Notes
|
42
|
+
------------- | ------------- | ------------- | -------------
|
43
|
+
**ports** | [**Ports**](Ports.md)| list of ports to bind to, where 0 indicates dynamically bind to any available port |
|
44
|
+
|
45
|
+
### Return type
|
46
|
+
|
47
|
+
[**Ports**](Ports.md)
|
48
|
+
|
49
|
+
### Authorization
|
50
|
+
|
51
|
+
No authorization required
|
52
|
+
|
53
|
+
### HTTP request headers
|
54
|
+
|
55
|
+
- **Content-Type**: application/json
|
56
|
+
- **Accept**: application/json
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
# **clear_put**
|
61
|
+
> clear_put(opts)
|
62
|
+
|
63
|
+
clears expectations and recorded requests that match the request matcher
|
64
|
+
|
65
|
+
### Example
|
66
|
+
```ruby
|
67
|
+
# load the gem
|
68
|
+
require 'mockserver-client'
|
69
|
+
|
70
|
+
api_instance = MockServer::ControlApi.new
|
71
|
+
opts = {
|
72
|
+
http_request: MockServer::HttpRequest.new # HttpRequest | request used to match expectations and recored requests to clear
|
73
|
+
}
|
74
|
+
|
75
|
+
begin
|
76
|
+
#clears expectations and recorded requests that match the request matcher
|
77
|
+
api_instance.clear_put(opts)
|
78
|
+
rescue MockServer::ApiError => e
|
79
|
+
puts "Exception when calling ControlApi->clear_put: #{e}"
|
80
|
+
end
|
81
|
+
```
|
82
|
+
|
83
|
+
### Parameters
|
84
|
+
|
85
|
+
Name | Type | Description | Notes
|
86
|
+
------------- | ------------- | ------------- | -------------
|
87
|
+
**http_request** | [**HttpRequest**](HttpRequest.md)| request used to match expectations and recored requests to clear | [optional]
|
88
|
+
|
89
|
+
### Return type
|
90
|
+
|
91
|
+
nil (empty response body)
|
92
|
+
|
93
|
+
### Authorization
|
94
|
+
|
95
|
+
No authorization required
|
96
|
+
|
97
|
+
### HTTP request headers
|
98
|
+
|
99
|
+
- **Content-Type**: application/json
|
100
|
+
- **Accept**: Not defined
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
# **reset_put**
|
105
|
+
> reset_put
|
106
|
+
|
107
|
+
clears all expectations and recorded requests
|
108
|
+
|
109
|
+
### Example
|
110
|
+
```ruby
|
111
|
+
# load the gem
|
112
|
+
require 'mockserver-client'
|
113
|
+
|
114
|
+
api_instance = MockServer::ControlApi.new
|
115
|
+
|
116
|
+
begin
|
117
|
+
#clears all expectations and recorded requests
|
118
|
+
api_instance.reset_put
|
119
|
+
rescue MockServer::ApiError => e
|
120
|
+
puts "Exception when calling ControlApi->reset_put: #{e}"
|
121
|
+
end
|
122
|
+
```
|
123
|
+
|
124
|
+
### Parameters
|
125
|
+
This endpoint does not need any parameter.
|
126
|
+
|
127
|
+
### Return type
|
128
|
+
|
129
|
+
nil (empty response body)
|
130
|
+
|
131
|
+
### Authorization
|
132
|
+
|
133
|
+
No authorization required
|
134
|
+
|
135
|
+
### HTTP request headers
|
136
|
+
|
137
|
+
- **Content-Type**: Not defined
|
138
|
+
- **Accept**: Not defined
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
# **retrieve_put**
|
143
|
+
> Object retrieve_put(opts)
|
144
|
+
|
145
|
+
retrieve recorded requests, active expectations, recorded expectations or log messages
|
146
|
+
|
147
|
+
### Example
|
148
|
+
```ruby
|
149
|
+
# load the gem
|
150
|
+
require 'mockserver-client'
|
151
|
+
|
152
|
+
api_instance = MockServer::ControlApi.new
|
153
|
+
opts = {
|
154
|
+
format: 'format_example', # String | changes response format, default if not specificed is \"json\", supported values are \"java\", \"json\"
|
155
|
+
type: 'type_example', # String | specifies the type of object that is retrieve, default if not specified is \"requests\", supported values are \"logs\", \"requests\", \"recorded_expectations\", \"active_expectations\"
|
156
|
+
http_request: MockServer::HttpRequest.new # HttpRequest | request used to match which recorded requests, expectations or log messages to return, an empty body matches all requests, expectations or log messages
|
157
|
+
}
|
158
|
+
|
159
|
+
begin
|
160
|
+
#retrieve recorded requests, active expectations, recorded expectations or log messages
|
161
|
+
result = api_instance.retrieve_put(opts)
|
162
|
+
p result
|
163
|
+
rescue MockServer::ApiError => e
|
164
|
+
puts "Exception when calling ControlApi->retrieve_put: #{e}"
|
165
|
+
end
|
166
|
+
```
|
167
|
+
|
168
|
+
### Parameters
|
169
|
+
|
170
|
+
Name | Type | Description | Notes
|
171
|
+
------------- | ------------- | ------------- | -------------
|
172
|
+
**format** | **String**| changes response format, default if not specificed is \"json\", supported values are \"java\", \"json\" | [optional]
|
173
|
+
**type** | **String**| specifies the type of object that is retrieve, default if not specified is \"requests\", supported values are \"logs\", \"requests\", \"recorded_expectations\", \"active_expectations\" | [optional]
|
174
|
+
**http_request** | [**HttpRequest**](HttpRequest.md)| request used to match which recorded requests, expectations or log messages to return, an empty body matches all requests, expectations or log messages | [optional]
|
175
|
+
|
176
|
+
### Return type
|
177
|
+
|
178
|
+
**Object**
|
179
|
+
|
180
|
+
### Authorization
|
181
|
+
|
182
|
+
No authorization required
|
183
|
+
|
184
|
+
### HTTP request headers
|
185
|
+
|
186
|
+
- **Content-Type**: application/json
|
187
|
+
- **Accept**: application/json, application/java, text/plain
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
# **status_put**
|
192
|
+
> Ports status_put
|
193
|
+
|
194
|
+
return listening ports
|
195
|
+
|
196
|
+
### Example
|
197
|
+
```ruby
|
198
|
+
# load the gem
|
199
|
+
require 'mockserver-client'
|
200
|
+
|
201
|
+
api_instance = MockServer::ControlApi.new
|
202
|
+
|
203
|
+
begin
|
204
|
+
#return listening ports
|
205
|
+
result = api_instance.status_put
|
206
|
+
p result
|
207
|
+
rescue MockServer::ApiError => e
|
208
|
+
puts "Exception when calling ControlApi->status_put: #{e}"
|
209
|
+
end
|
210
|
+
```
|
211
|
+
|
212
|
+
### Parameters
|
213
|
+
This endpoint does not need any parameter.
|
214
|
+
|
215
|
+
### Return type
|
216
|
+
|
217
|
+
[**Ports**](Ports.md)
|
218
|
+
|
219
|
+
### Authorization
|
220
|
+
|
221
|
+
No authorization required
|
222
|
+
|
223
|
+
### HTTP request headers
|
224
|
+
|
225
|
+
- **Content-Type**: Not defined
|
226
|
+
- **Accept**: application/json
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
# **stop_put**
|
231
|
+
> stop_put
|
232
|
+
|
233
|
+
stop running process
|
234
|
+
|
235
|
+
only supported on Netty version
|
236
|
+
|
237
|
+
### Example
|
238
|
+
```ruby
|
239
|
+
# load the gem
|
240
|
+
require 'mockserver-client'
|
241
|
+
|
242
|
+
api_instance = MockServer::ControlApi.new
|
243
|
+
|
244
|
+
begin
|
245
|
+
#stop running process
|
246
|
+
api_instance.stop_put
|
247
|
+
rescue MockServer::ApiError => e
|
248
|
+
puts "Exception when calling ControlApi->stop_put: #{e}"
|
249
|
+
end
|
250
|
+
```
|
251
|
+
|
252
|
+
### Parameters
|
253
|
+
This endpoint does not need any parameter.
|
254
|
+
|
255
|
+
### Return type
|
256
|
+
|
257
|
+
nil (empty response body)
|
258
|
+
|
259
|
+
### Authorization
|
260
|
+
|
261
|
+
No authorization required
|
262
|
+
|
263
|
+
### HTTP request headers
|
264
|
+
|
265
|
+
- **Content-Type**: Not defined
|
266
|
+
- **Accept**: Not defined
|
267
|
+
|
268
|
+
|
269
|
+
|
data/docs/Delay.md
ADDED
data/docs/Expectation.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# MockServer::ExpectationApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:1080*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**expectation_put**](ExpectationApi.md#expectation_put) | **PUT** /expectation | create expectation
|
8
|
+
|
9
|
+
|
10
|
+
# **expectation_put**
|
11
|
+
> expectation_put(expectations)
|
12
|
+
|
13
|
+
create expectation
|
14
|
+
|
15
|
+
### Example
|
16
|
+
```ruby
|
17
|
+
# load the gem
|
18
|
+
require 'mockserver-client'
|
19
|
+
|
20
|
+
api_instance = MockServer::ExpectationApi.new
|
21
|
+
expectations = nil # Array<Expectations> | expectation to create
|
22
|
+
|
23
|
+
begin
|
24
|
+
#create expectation
|
25
|
+
api_instance.expectation_put(expectations)
|
26
|
+
rescue MockServer::ApiError => e
|
27
|
+
puts "Exception when calling ExpectationApi->expectation_put: #{e}"
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
### Parameters
|
32
|
+
|
33
|
+
Name | Type | Description | Notes
|
34
|
+
------------- | ------------- | ------------- | -------------
|
35
|
+
**expectations** | [**Array<Expectations>**](Array.md)| expectation to create |
|
36
|
+
|
37
|
+
### Return type
|
38
|
+
|
39
|
+
nil (empty response body)
|
40
|
+
|
41
|
+
### Authorization
|
42
|
+
|
43
|
+
No authorization required
|
44
|
+
|
45
|
+
### HTTP request headers
|
46
|
+
|
47
|
+
- **Content-Type**: application/json
|
48
|
+
- **Accept**: Not defined
|
49
|
+
|
50
|
+
|
51
|
+
|
data/docs/HttpError.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# MockServer::HttpError
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**delay** | [**Delay**](Delay.md) | | [optional]
|
7
|
+
**drop_connection** | **BOOLEAN** | | [optional]
|
8
|
+
**response_bytes** | **String** | | [optional]
|
9
|
+
|
10
|
+
|
data/docs/HttpForward.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# MockServer::HttpForward
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**host** | **String** | | [optional]
|
7
|
+
**port** | **Integer** | | [optional]
|
8
|
+
**scheme** | **String** | | [optional]
|
9
|
+
**delay** | [**Delay**](Delay.md) | | [optional]
|
10
|
+
|
11
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# MockServer::HttpOverrideForwardedRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**http_request** | [**HttpRequest**](HttpRequest.md) | | [optional]
|
7
|
+
**delay** | [**Delay**](Delay.md) | | [optional]
|
8
|
+
|
9
|
+
|
data/docs/HttpRequest.md
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# MockServer::HttpRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**body** | [**Body**](Body.md) | | [optional]
|
7
|
+
**headers** | [**KeyToMultiValue**](KeyToMultiValue.md) | | [optional]
|
8
|
+
**cookies** | [**KeyToValue**](KeyToValue.md) | | [optional]
|
9
|
+
**query_string_parameters** | [**KeyToMultiValue**](KeyToMultiValue.md) | | [optional]
|
10
|
+
**path** | **String** | | [optional]
|
11
|
+
**method** | **String** | | [optional]
|
12
|
+
**secure** | **BOOLEAN** | | [optional]
|
13
|
+
**keep_alive** | **BOOLEAN** | | [optional]
|
14
|
+
|
15
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# MockServer::HttpResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**body** | [**BodyWithContentType**](BodyWithContentType.md) | | [optional]
|
7
|
+
**delay** | [**Delay**](Delay.md) | | [optional]
|
8
|
+
**cookies** | [**KeyToValue**](KeyToValue.md) | | [optional]
|
9
|
+
**connection_options** | [**ConnectionOptions**](ConnectionOptions.md) | | [optional]
|
10
|
+
**headers** | [**KeyToMultiValue**](KeyToMultiValue.md) | | [optional]
|
11
|
+
**status_code** | **Integer** | | [optional]
|
12
|
+
**reason_phrase** | **String** | | [optional]
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# MockServer::HttpTemplate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**template_type** | **String** | | [optional]
|
7
|
+
**template** | **String** | | [optional]
|
8
|
+
**delay** | [**Delay**](Delay.md) | | [optional]
|
9
|
+
|
10
|
+
|
data/docs/KeyToValue.md
ADDED
data/docs/Ports.md
ADDED
data/docs/TimeToLive.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# MockServer::TimeToLive
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**time_unit** | **String** | | [optional]
|
7
|
+
**time_to_live** | **Integer** | | [optional]
|
8
|
+
**unlimited** | **BOOLEAN** | | [optional]
|
9
|
+
|
10
|
+
|