lib/dependency-tracker-client/api/vulnerability_api.rb
# Assigns a vulnerability to a component
# @param source [String] The vulnerability source
# @param vuln_id [String] The vulnId
# @param component [String] The UUID of the component
# @param [Hash] opts the optional parameters
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
Assigns a vulnerability to a component
Assigns a vulnerability to a component
def assign_vulnerability_with_http_info(source, vuln_id, component, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: VulnerabilityApi.assign_vulnerability ...'
      end
      if @api_client.config.client_side_validation && source.nil?
        fail ArgumentError, "Missing the required parameter 'source' when calling VulnerabilityApi.assign_vulnerability"
      end
      if @api_client.config.client_side_validation && vuln_id.nil?
        fail ArgumentError, "Missing the required parameter 'vuln_id' when calling VulnerabilityApi.assign_vulnerability"
      end
      if @api_client.config.client_side_validation && component.nil?
        fail ArgumentError, "Missing the required parameter 'component' when calling VulnerabilityApi.assign_vulnerability"
      end
      local_var_path = '/v1/vulnerability/source/{source}/vuln/{vulnId}/component/{component}'.sub('{' + 'source' + '}', CGI.escape(source.to_s)).sub('{' + 'vulnId' + '}', CGI.escape(vuln_id.to_s)).sub('{' + 'component' + '}', CGI.escape(component.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      form_params = opts[:form_params] || {}
      post_body = opts[:body] 
      return_type = opts[:return_type] 
      auth_names = opts[:auth_names] || ['X-Api-Key']
      new_options = opts.merge(
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: VulnerabilityApi#assign_vulnerability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def assign_vulnerability_with_http_info ( source , vuln_id , component , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: VulnerabilityApi.assign_vulnerability ...' end if @api_client . config . client_side_validation && source . nil? fail ArgumentError , "Missing the required parameter 'source' when calling VulnerabilityApi.assign_vulnerability" end if @api_client . config . client_side_validation && vuln_id . nil? fail ArgumentError , "Missing the required parameter 'vuln_id' when calling VulnerabilityApi.assign_vulnerability" end if @api_client . config . client_side_validation && component . nil? fail ArgumentError , "Missing the required parameter 'component' when calling VulnerabilityApi.assign_vulnerability" end local_var_path = '/v1/vulnerability/source/{source}/vuln/{vulnId}/component/{component}' . sub ( '{' + 'source' + '}' , CGI . escape ( source . to_s ) ) . sub ( '{' + 'vulnId' + '}' , CGI . escape ( vuln_id . to_s ) ) . sub ( '{' + 'component' + '}' , CGI . escape ( component . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } form_params = opts [ :form_params ] || { } post_body = opts [ :body ] return_type = opts [ :return_type ] auth_names = opts [ :auth_names ] || [ 'X-Api-Key' ] new_options = opts . merge ( :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: VulnerabilityApi#assign_vulnerability\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Assigns a vulnerability to a component
Assigns a vulnerability to a component
# verify the required parameter 'source' is set # verify the required parameter 'vuln_id' is set # verify the required parameter 'component' is set # resource path # query parameters # header parameters # form parameters # http body (model) # return_type # auth_names
nil, response status code and response headers
nil response status code and response headers
Array<(nil, Integer, Hash)>
source
The vulnerability source
The vulnerability source
vuln_id
None
component
The UUID of the component
The UUID of the component
opts
<not_specific>
<not_specific>
opts the optional parameters
opts the optional parameters