Class: ValidatorClient::ValidationApi
- Inherits:
-
Object
- Object
- ValidatorClient::ValidationApi
- Defined in:
- lib/md-validator-client/api/validation_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_validators(opts = {}) ⇒ Array<Validator>
lists available validators Lists all of the available validator pipelines.
-
#get_validators_with_http_info(opts = {}) ⇒ Array<(Array<Validator>, Fixnum, Hash)>
lists available validators Lists all of the available validator pipelines.
-
#initialize(api_client = ApiClient.default) ⇒ ValidationApi
constructor
A new instance of ValidationApi.
-
#validate(validator_id, metadata, opts = {}) ⇒ Array<Status>
performs a validation.
-
#validate_with_http_info(validator_id, metadata, opts = {}) ⇒ Array<(Array<Status>, Fixnum, Hash)>
performs a validation.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ValidationApi
Returns a new instance of ValidationApi.
19 20 21 |
# File 'lib/md-validator-client/api/validation_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/md-validator-client/api/validation_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_validators(opts = {}) ⇒ Array<Validator>
lists available validators Lists all of the available validator pipelines.
26 27 28 29 |
# File 'lib/md-validator-client/api/validation_api.rb', line 26 def get_validators(opts = {}) data, _status_code, _headers = get_validators_with_http_info(opts) data end |
#get_validators_with_http_info(opts = {}) ⇒ Array<(Array<Validator>, Fixnum, Hash)>
lists available validators Lists all of the available validator pipelines.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/md-validator-client/api/validation_api.rb', line 35 def get_validators_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ValidationApi.get_validators ...' end # resource path local_var_path = '/validators' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<Validator>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ValidationApi#get_validators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#validate(validator_id, metadata, opts = {}) ⇒ Array<Status>
performs a validation
73 74 75 76 |
# File 'lib/md-validator-client/api/validation_api.rb', line 73 def validate(validator_id, , opts = {}) data, _status_code, _headers = validate_with_http_info(validator_id, , opts) data end |
#validate_with_http_info(validator_id, metadata, opts = {}) ⇒ Array<(Array<Status>, Fixnum, Hash)>
performs a validation
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/md-validator-client/api/validation_api.rb', line 83 def validate_with_http_info(validator_id, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ValidationApi.validate ...' end # verify the required parameter 'validator_id' is set if @api_client.config.client_side_validation && validator_id.nil? fail ArgumentError, "Missing the required parameter 'validator_id' when calling ValidationApi.validate" end # verify the required parameter 'metadata' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'metadata' when calling ValidationApi.validate" end # resource path local_var_path = '/validators/{validator_id}/validate'.sub('{' + 'validator_id' + '}', validator_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/xml+samlmetadata']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body() auth_names = [] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<Status>') if @api_client.config.debugging @api_client.config.logger.debug "API called: ValidationApi#validate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |