mockserver-client-2 5.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +8 -0
  3. data/README.md +120 -0
  4. data/Rakefile +10 -0
  5. data/code-generate.md +3 -0
  6. data/code-generation-config.json +10 -0
  7. data/docs/Body.md +7 -0
  8. data/docs/BodyWithContentType.md +7 -0
  9. data/docs/ConnectionOptions.md +12 -0
  10. data/docs/ControlApi.md +269 -0
  11. data/docs/Delay.md +9 -0
  12. data/docs/Expectation.md +7 -0
  13. data/docs/ExpectationApi.md +51 -0
  14. data/docs/Expectations.md +7 -0
  15. data/docs/HttpClassCallback.md +8 -0
  16. data/docs/HttpError.md +10 -0
  17. data/docs/HttpForward.md +11 -0
  18. data/docs/HttpObjectCallback.md +8 -0
  19. data/docs/HttpOverrideForwardedRequest.md +9 -0
  20. data/docs/HttpRequest.md +15 -0
  21. data/docs/HttpResponse.md +14 -0
  22. data/docs/HttpTemplate.md +10 -0
  23. data/docs/KeyToMultiValue.md +7 -0
  24. data/docs/KeyToValue.md +7 -0
  25. data/docs/Ports.md +8 -0
  26. data/docs/TimeToLive.md +10 -0
  27. data/docs/Times.md +9 -0
  28. data/docs/Verification.md +9 -0
  29. data/docs/VerificationSequence.md +8 -0
  30. data/docs/VerificationTimes.md +9 -0
  31. data/docs/VerifyApi.md +94 -0
  32. data/lib/mockserver-client/api/control_api.rb +316 -0
  33. data/lib/mockserver-client/api/expectation_api.rb +73 -0
  34. data/lib/mockserver-client/api/verify_api.rb +127 -0
  35. data/lib/mockserver-client/api_client.rb +388 -0
  36. data/lib/mockserver-client/api_error.rb +38 -0
  37. data/lib/mockserver-client/configuration.rb +202 -0
  38. data/lib/mockserver-client/models/body.rb +174 -0
  39. data/lib/mockserver-client/models/body_with_content_type.rb +174 -0
  40. data/lib/mockserver-client/models/connection_options.rb +219 -0
  41. data/lib/mockserver-client/models/delay.rb +192 -0
  42. data/lib/mockserver-client/models/expectation.rb +174 -0
  43. data/lib/mockserver-client/models/expectations.rb +174 -0
  44. data/lib/mockserver-client/models/http_class_callback.rb +183 -0
  45. data/lib/mockserver-client/models/http_error.rb +201 -0
  46. data/lib/mockserver-client/models/http_forward.rb +244 -0
  47. data/lib/mockserver-client/models/http_object_callback.rb +183 -0
  48. data/lib/mockserver-client/models/http_override_forwarded_request.rb +192 -0
  49. data/lib/mockserver-client/models/http_request.rb +246 -0
  50. data/lib/mockserver-client/models/http_response.rb +237 -0
  51. data/lib/mockserver-client/models/http_template.rb +235 -0
  52. data/lib/mockserver-client/models/key_to_multi_value.rb +174 -0
  53. data/lib/mockserver-client/models/key_to_value.rb +174 -0
  54. data/lib/mockserver-client/models/ports.rb +185 -0
  55. data/lib/mockserver-client/models/time_to_live.rb +235 -0
  56. data/lib/mockserver-client/models/times.rb +192 -0
  57. data/lib/mockserver-client/models/verification.rb +192 -0
  58. data/lib/mockserver-client/models/verification_sequence.rb +185 -0
  59. data/lib/mockserver-client/models/verification_times.rb +192 -0
  60. data/lib/mockserver-client/version.rb +15 -0
  61. data/lib/mockserver-client.rb +64 -0
  62. data/mockserver-client.gemspec +45 -0
  63. data/spec/api/control_api_spec.rb +102 -0
  64. data/spec/api/expectation_api_spec.rb +46 -0
  65. data/spec/api/verify_api_spec.rb +57 -0
  66. data/spec/api_client_spec.rb +226 -0
  67. data/spec/configuration_spec.rb +42 -0
  68. data/spec/models/body_spec.rb +35 -0
  69. data/spec/models/body_with_content_type_spec.rb +35 -0
  70. data/spec/models/connection_options_spec.rb +65 -0
  71. data/spec/models/delay_spec.rb +47 -0
  72. data/spec/models/expectation_spec.rb +35 -0
  73. data/spec/models/expectations_spec.rb +35 -0
  74. data/spec/models/http_class_callback_spec.rb +41 -0
  75. data/spec/models/http_error_spec.rb +53 -0
  76. data/spec/models/http_forward_spec.rb +63 -0
  77. data/spec/models/http_object_callback_spec.rb +41 -0
  78. data/spec/models/http_override_forwarded_request_spec.rb +47 -0
  79. data/spec/models/http_request_spec.rb +83 -0
  80. data/spec/models/http_response_spec.rb +77 -0
  81. data/spec/models/http_template_spec.rb +57 -0
  82. data/spec/models/key_to_multi_value_spec.rb +35 -0
  83. data/spec/models/key_to_value_spec.rb +35 -0
  84. data/spec/models/ports_spec.rb +41 -0
  85. data/spec/models/time_to_live_spec.rb +57 -0
  86. data/spec/models/times_spec.rb +47 -0
  87. data/spec/models/verification_sequence_spec.rb +41 -0
  88. data/spec/models/verification_spec.rb +47 -0
  89. data/spec/models/verification_times_spec.rb +47 -0
  90. data/spec/spec_helper.rb +111 -0
  91. 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
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 12.0.0'
7
+ gem 'pry-byebug'
8
+ end
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
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
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,7 @@
1
+ # MockServer::Body
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,7 @@
1
+ # MockServer::BodyWithContentType
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -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
+
@@ -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
@@ -0,0 +1,9 @@
1
+ # MockServer::Delay
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **time_unit** | **String** | | [optional]
7
+ **value** | **Integer** | | [optional]
8
+
9
+
@@ -0,0 +1,7 @@
1
+ # MockServer::Expectation
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -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&lt;Expectations&gt;**](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
+
@@ -0,0 +1,7 @@
1
+ # MockServer::Expectations
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,8 @@
1
+ # MockServer::HttpClassCallback
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **callback_class** | **String** | | [optional]
7
+
8
+
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
+
@@ -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,8 @@
1
+ # MockServer::HttpObjectCallback
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **client_id** | **String** | | [optional]
7
+
8
+
@@ -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
+
@@ -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
+
@@ -0,0 +1,7 @@
1
+ # MockServer::KeyToMultiValue
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
@@ -0,0 +1,7 @@
1
+ # MockServer::KeyToValue
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+
7
+
data/docs/Ports.md ADDED
@@ -0,0 +1,8 @@
1
+ # MockServer::Ports
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **ports** | **Array&lt;Float&gt;** | | [optional]
7
+
8
+
@@ -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
+