Skip to content

Commit

Permalink
nl to space
Browse files Browse the repository at this point in the history
  • Loading branch information
jirikuncar committed Feb 3, 2022
1 parent c12366c commit 10dafc1
Show file tree
Hide file tree
Showing 46 changed files with 120 additions and 996 deletions.
15 changes: 6 additions & 9 deletions .generator/src/generator/templates/api.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ module {{ config.moduleName }}
{%- endif %}

{%- for name, parameter in operation|parameters if parameter.required %}
# @param {{ name|attribute_name }} [{{ get_type_for_parameter(parameter) }}] {{ parameter.get("description", "").replace('\n', '') }}
# @param {{ name|attribute_name }} [{{ get_type_for_parameter(parameter) }}] {{ parameter.get("description", "").replace('\n', ' ') }}
{%- endfor %}
# @param [Hash] opts the optional parameters
{%- for name, parameter in operation|parameters if not parameter.required %}
# @option opts [{{ get_type_for_parameter(parameter) }}] :{{ name|attribute_name }} {{ parameter.get("description", "").replace('\n', '') }}{% if "default" in parameter%} (default to {{ parameter.default|format_value }}) {% endif %}
# @option opts [{{ get_type_for_parameter(parameter) }}] :{{ name|attribute_name }} {{ parameter.get("description", "").replace('\n', ' ') }}{% if "default" in parameter%} (default to {{ parameter.default|format_value }}) {% endif %}
{%- endfor %}
# @return [{% if returnType %}{{ returnType }}{% else %}nil{% endif %}]
def {{ operation.operationId|snake_case }}({% for name, parameter in operation|parameters if parameter.required %}{{ name|attribute_name }}, {% endfor %}opts = {})
Expand All @@ -50,11 +50,11 @@ module {{ config.moduleName }}
# {{ operation.description.rstrip()|replace('\n', '\n# ')|indent(4) }}
{%- endif %}
{%- for name, parameter in operation|parameters if parameter.required %}
# @param {{ name|attribute_name }} [{{ get_type_for_parameter(parameter) }}] {{ parameter.get("description", "").replace('\n', '') }}
# @param {{ name|attribute_name }} [{{ get_type_for_parameter(parameter) }}] {{ parameter.get("description", "").replace('\n', ' ') }}
{%- endfor %}
# @param [Hash] opts the optional parameters
{%- for name, parameter in operation|parameters if not parameter.required %}
# @option opts [{{ get_type_for_parameter(parameter) }}] :{{ name|attribute_name }} {{ parameter.get("description", "").replace('\n', '') }}{% if "default" in parameter%} (default to {{ parameter.default|json }}) {% endif %}
# @option opts [{{ get_type_for_parameter(parameter) }}] :{{ name|attribute_name }} {{ parameter.get("description", "").replace('\n', ' ') }}{% if "default" in parameter%} (default to {{ parameter.default|json }}) {% endif %}
{%- endfor %}
# @return [Array<({% if returnType %}{{ returnType }}{% else %}nil{% endif %}, Integer, Hash)>] {% if returnType %}{{ returnType }} data{% else %}nil{% endif %}, response status code and response headers
def {{ operation.operationId|snake_case }}_with_http_info({% for name, parameter in operation|parameters if parameter.required %}{{ name|attribute_name }}, {% endfor %}opts = {})
Expand Down Expand Up @@ -101,8 +101,7 @@ module {{ config.moduleName }}
{%- endif %}
{%- endif %}

{%- endif %}
{#
{%- endif %}{#
{{#hasValidation}}
{{#maxLength}}
if @api_client.config.client_side_validation && {{^required}}!opts[:'{{ name|attribute_name }}'].nil? && {{/required}}{{#required}}{{ name|attribute_name }}{{/required}}{{^required}}opts[:'{{ name|attribute_name }}']{{/required}}.to_s.length > {{{maxLength}}}
Expand Down Expand Up @@ -148,9 +147,7 @@ module {{ config.moduleName }}
{{/minItems}}
{{/hasValidation}}
#}
{%- endfor %}

#}{%- endfor %}
# resource path
local_var_path = '{{ path }}'{% for parameter in operation.parameters if parameter.in == "path" %}.sub('{{ '{' }}{{ parameter.name }}{{ '}'}}', CGI.escape({{ parameter.name }}.to_s).gsub('%2F', '/')){% endfor %}

Expand Down
1 change: 0 additions & 1 deletion lib/datadog_api_client/v1/api/authentication_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def validate_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AuthenticationAPI.validate ...'
end

# resource path
local_var_path = '/api/v1/validate'

Expand Down
38 changes: 8 additions & 30 deletions lib/datadog_api_client/v1/api/aws_integration_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ def create_aws_account_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.create_aws_account"
end


# resource path
local_var_path = '/api/v1/integration/aws'

Expand Down Expand Up @@ -106,7 +104,7 @@ def create_aws_account_with_http_info(body, opts = {})
end
# Set an AWS tag filter
# Set an AWS tag filter.
# @param body [AWSTagFilterCreateRequest] Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string.Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.
# @param body [AWSTagFilterCreateRequest] Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string. Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.
# @param [Hash] opts the optional parameters
# @return [Object]
def create_aws_tag_filter(body, opts = {})
Expand All @@ -116,7 +114,7 @@ def create_aws_tag_filter(body, opts = {})

# Set an AWS tag filter
# Set an AWS tag filter.
# @param body [AWSTagFilterCreateRequest] Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string.Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.
# @param body [AWSTagFilterCreateRequest] Set an AWS tag filter using an `aws_account_identifier`, `namespace`, and filtering string. Namespace options are `application_elb`, `elb`, `lambda`, `network_elb`, `rds`, `sqs`, and `custom`.
# @param [Hash] opts the optional parameters
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
def create_aws_tag_filter_with_http_info(body, opts = {})
Expand All @@ -137,8 +135,6 @@ def create_aws_tag_filter_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.create_aws_tag_filter"
end


# resource path
local_var_path = '/api/v1/integration/aws/filtering'

Expand Down Expand Up @@ -182,7 +178,7 @@ def create_aws_tag_filter_with_http_info(body, opts = {})
end
# Generate a new external ID
# Generate a new AWS external ID for a given AWS account ID and role name pair.
# @param body [AWSAccount] Your Datadog role delegation name.For more information about your AWS account Role name,see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).
# @param body [AWSAccount] Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).
# @param [Hash] opts the optional parameters
# @return [AWSAccountCreateResponse]
def create_new_aws_external_id(body, opts = {})
Expand All @@ -192,7 +188,7 @@ def create_new_aws_external_id(body, opts = {})

# Generate a new external ID
# Generate a new AWS external ID for a given AWS account ID and role name pair.
# @param body [AWSAccount] Your Datadog role delegation name.For more information about your AWS account Role name,see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).
# @param body [AWSAccount] Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](https://docs.datadoghq.com/integrations/amazon_web_services/#setup).
# @param [Hash] opts the optional parameters
# @return [Array<(AWSAccountCreateResponse, Integer, Hash)>] AWSAccountCreateResponse data, response status code and response headers
def create_new_aws_external_id_with_http_info(body, opts = {})
Expand All @@ -213,8 +209,6 @@ def create_new_aws_external_id_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.create_new_aws_external_id"
end


# resource path
local_var_path = '/api/v1/integration/aws/generate_new_external_id'

Expand Down Expand Up @@ -289,8 +283,6 @@ def delete_aws_account_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.delete_aws_account"
end


# resource path
local_var_path = '/api/v1/integration/aws'

Expand Down Expand Up @@ -365,8 +357,6 @@ def delete_aws_tag_filter_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.delete_aws_tag_filter"
end


# resource path
local_var_path = '/api/v1/integration/aws/filtering'

Expand Down Expand Up @@ -435,7 +425,6 @@ def list_available_aws_namespaces_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.list_available_aws_namespaces ...'
end

# resource path
local_var_path = '/api/v1/integration/aws/available_namespace_rules'

Expand Down Expand Up @@ -508,10 +497,6 @@ def list_aws_accounts_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.list_aws_accounts ...'
end




# resource path
local_var_path = '/api/v1/integration/aws'

Expand Down Expand Up @@ -587,8 +572,6 @@ def list_aws_tag_filters_with_http_info(account_id, opts = {})
if @api_client.config.client_side_validation && account_id.nil?
fail ArgumentError, "Missing the required parameter 'account_id' when calling AWSIntegrationAPI.list_aws_tag_filters"
end


# resource path
local_var_path = '/api/v1/integration/aws/filtering'

Expand Down Expand Up @@ -634,8 +617,8 @@ def list_aws_tag_filters_with_http_info(account_id, opts = {})
# @param body [AWSAccount] AWS request object
# @param [Hash] opts the optional parameters
# @option opts [String] :account_id Only return AWS accounts that matches this `account_id`.
# @option opts [String] :role_name Only return AWS accounts that match this `role_name`.Required if `account_id` is specified.
# @option opts [String] :access_key_id Only return AWS accounts that matches this `access_key_id`.Required if none of the other two options are specified.
# @option opts [String] :role_name Only return AWS accounts that match this `role_name`. Required if `account_id` is specified.
# @option opts [String] :access_key_id Only return AWS accounts that matches this `access_key_id`. Required if none of the other two options are specified.
# @return [Object]
def update_aws_account(body, opts = {})
data, _status_code, _headers = update_aws_account_with_http_info(body, opts)
Expand All @@ -647,8 +630,8 @@ def update_aws_account(body, opts = {})
# @param body [AWSAccount] AWS request object
# @param [Hash] opts the optional parameters
# @option opts [String] :account_id Only return AWS accounts that matches this `account_id`.
# @option opts [String] :role_name Only return AWS accounts that match this `role_name`.Required if `account_id` is specified.
# @option opts [String] :access_key_id Only return AWS accounts that matches this `access_key_id`.Required if none of the other two options are specified.
# @option opts [String] :role_name Only return AWS accounts that match this `role_name`. Required if `account_id` is specified.
# @option opts [String] :access_key_id Only return AWS accounts that matches this `access_key_id`. Required if none of the other two options are specified.
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
def update_aws_account_with_http_info(body, opts = {})

Expand All @@ -664,15 +647,10 @@ def update_aws_account_with_http_info(body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.update_aws_account ...'
end



# verify the required parameter 'body' is set
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSIntegrationAPI.update_aws_account"
end


# resource path
local_var_path = '/api/v1/integration/aws'

Expand Down
12 changes: 0 additions & 12 deletions lib/datadog_api_client/v1/api/aws_logs_integration_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ def check_aws_logs_lambda_async_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSLogsIntegrationAPI.check_aws_logs_lambda_async"
end


# resource path
local_var_path = '/api/v1/integration/aws/logs/check_async'

Expand Down Expand Up @@ -163,8 +161,6 @@ def check_aws_logs_services_async_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSLogsIntegrationAPI.check_aws_logs_services_async"
end


# resource path
local_var_path = '/api/v1/integration/aws/logs/services_async'

Expand Down Expand Up @@ -239,8 +235,6 @@ def create_aws_lambda_arn_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSLogsIntegrationAPI.create_aws_lambda_arn"
end


# resource path
local_var_path = '/api/v1/integration/aws/logs'

Expand Down Expand Up @@ -315,8 +309,6 @@ def delete_aws_lambda_arn_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSLogsIntegrationAPI.delete_aws_lambda_arn"
end


# resource path
local_var_path = '/api/v1/integration/aws/logs'

Expand Down Expand Up @@ -391,8 +383,6 @@ def enable_aws_log_services_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AWSLogsIntegrationAPI.enable_aws_log_services"
end


# resource path
local_var_path = '/api/v1/integration/aws/logs/services'

Expand Down Expand Up @@ -461,7 +451,6 @@ def list_aws_logs_integrations_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AWSLogsIntegrationAPI.list_aws_logs_integrations ...'
end

# resource path
local_var_path = '/api/v1/integration/aws/logs'

Expand Down Expand Up @@ -528,7 +517,6 @@ def list_aws_logs_services_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AWSLogsIntegrationAPI.list_aws_logs_services ...'
end

# resource path
local_var_path = '/api/v1/integration/aws/logs/services'

Expand Down
9 changes: 0 additions & 9 deletions lib/datadog_api_client/v1/api/azure_integration_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ def create_azure_integration_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AzureIntegrationAPI.create_azure_integration"
end


# resource path
local_var_path = '/api/v1/integration/azure'

Expand Down Expand Up @@ -143,8 +141,6 @@ def delete_azure_integration_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AzureIntegrationAPI.delete_azure_integration"
end


# resource path
local_var_path = '/api/v1/integration/azure'

Expand Down Expand Up @@ -213,7 +209,6 @@ def list_azure_integration_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AzureIntegrationAPI.list_azure_integration ...'
end

# resource path
local_var_path = '/api/v1/integration/azure'

Expand Down Expand Up @@ -286,8 +281,6 @@ def update_azure_host_filters_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AzureIntegrationAPI.update_azure_host_filters"
end


# resource path
local_var_path = '/api/v1/integration/azure/host_filters'

Expand Down Expand Up @@ -366,8 +359,6 @@ def update_azure_integration_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling AzureIntegrationAPI.update_azure_integration"
end


# resource path
local_var_path = '/api/v1/integration/azure'

Expand Down
10 changes: 0 additions & 10 deletions lib/datadog_api_client/v1/api/dashboard_lists_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ def create_dashboard_list_with_http_info(body, opts = {})
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling DashboardListsAPI.create_dashboard_list"
end


# resource path
local_var_path = '/api/v1/dashboard/lists/manual'

Expand Down Expand Up @@ -131,8 +129,6 @@ def delete_dashboard_list_with_http_info(list_id, opts = {})
if @api_client.config.client_side_validation && list_id.nil?
fail ArgumentError, "Missing the required parameter 'list_id' when calling DashboardListsAPI.delete_dashboard_list"
end


# resource path
local_var_path = '/api/v1/dashboard/lists/manual/{list_id}'.sub('{list_id}', CGI.escape(list_id.to_s).gsub('%2F', '/'))

Expand Down Expand Up @@ -205,8 +201,6 @@ def get_dashboard_list_with_http_info(list_id, opts = {})
if @api_client.config.client_side_validation && list_id.nil?
fail ArgumentError, "Missing the required parameter 'list_id' when calling DashboardListsAPI.get_dashboard_list"
end


# resource path
local_var_path = '/api/v1/dashboard/lists/manual/{list_id}'.sub('{list_id}', CGI.escape(list_id.to_s).gsub('%2F', '/'))

Expand Down Expand Up @@ -273,7 +267,6 @@ def list_dashboard_lists_with_http_info(opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: DashboardListsAPI.list_dashboard_lists ...'
end

# resource path
local_var_path = '/api/v1/dashboard/lists/manual'

Expand Down Expand Up @@ -348,13 +341,10 @@ def update_dashboard_list_with_http_info(list_id, body, opts = {})
if @api_client.config.client_side_validation && list_id.nil?
fail ArgumentError, "Missing the required parameter 'list_id' when calling DashboardListsAPI.update_dashboard_list"
end

# verify the required parameter 'body' is set
if @api_client.config.client_side_validation && body.nil?
fail ArgumentError, "Missing the required parameter 'body' when calling DashboardListsAPI.update_dashboard_list"
end


# resource path
local_var_path = '/api/v1/dashboard/lists/manual/{list_id}'.sub('{list_id}', CGI.escape(list_id.to_s).gsub('%2F', '/'))

Expand Down
Loading

0 comments on commit 10dafc1

Please sign in to comment.