All URIs are relative to http://localhost:1080
Method | HTTP request | Description |
---|---|---|
mockserver_expectation_put | PUT /mockserver/expectation | create expectation |
mockserver_openapi_put | PUT /mockserver/openapi | create expectations from OpenAPI or Swagger |
<Array> mockserver_expectation_put(expectations)
create expectation
require 'time'
require 'mockserver-client'
api_instance = MockServer::ExpectationApi.new
expectations = nil # Expectations | expectation(s) to create
begin
# create expectation
result = api_instance.mockserver_expectation_put(expectations)
p result
rescue MockServer::ApiError => e
puts "Error when calling ExpectationApi->mockserver_expectation_put: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> mockserver_expectation_put_with_http_info(expectations)
begin
# create expectation
data, status_code, headers = api_instance.mockserver_expectation_put_with_http_info(expectations)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<Expectation>>
rescue MockServer::ApiError => e
puts "Error when calling ExpectationApi->mockserver_expectation_put_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
expectations | Expectations | expectation(s) to create |
No authorization required
- Content-Type: application/json
- Accept: application/json
<Array> mockserver_openapi_put(open_api_expectations)
create expectations from OpenAPI or Swagger
require 'time'
require 'mockserver-client'
api_instance = MockServer::ExpectationApi.new
open_api_expectations = nil # OpenAPIExpectations | expectation(s) to create
begin
# create expectations from OpenAPI or Swagger
result = api_instance.mockserver_openapi_put(open_api_expectations)
p result
rescue MockServer::ApiError => e
puts "Error when calling ExpectationApi->mockserver_openapi_put: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> mockserver_openapi_put_with_http_info(open_api_expectations)
begin
# create expectations from OpenAPI or Swagger
data, status_code, headers = api_instance.mockserver_openapi_put_with_http_info(open_api_expectations)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<Expectation>>
rescue MockServer::ApiError => e
puts "Error when calling ExpectationApi->mockserver_openapi_put_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
open_api_expectations | OpenAPIExpectations | expectation(s) to create |
No authorization required
- Content-Type: application/json
- Accept: application/json