Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-18 23:59:59.323435",
"spec_repo_commit": "7dba000a"
"regenerated": "2024-01-19 15:18:10.917989",
"spec_repo_commit": "b407748b"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-18 23:59:59.344143",
"spec_repo_commit": "7dba000a"
"regenerated": "2024-01-19 15:18:10.933129",
"spec_repo_commit": "b407748b"
}
}
}
10 changes: 5 additions & 5 deletions .generator/src/generator/templates/api.j2
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ module {{ module_name }}::{{ version|upper }}
{%- endfor %}

# http body (model)
post_body = opts[:debug_body]{% if operation.requestBody %} || @api_client.object_to_http_body(
{%- if operation.requestBody.required -%}
{{ operation.get("x-codegen-request-body-name", "body") }}
post_body = opts[:debug_body]{% for name, parameter in operation|parameters if name == "body" %} || @api_client.object_to_http_body(
{%- if parameter.required -%}
body
{%- else -%}
opts[:'{{ operation.get("x-codegen-request-body-name", "body") }}']
opts[:'body']
{%- endif -%}
){% endif %}
){% endfor %}

# return_type
return_type = opts[:debug_return_type]{% if returnType %} || '{{ returnType }}'{% endif %}
Expand Down
3 changes: 3 additions & 0 deletions features/step_definitions/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ def build_given(api_version, operation)

def model_builder(param, obj)
model = ScenariosModelMappings["v#{@api_version}.#{@operation_id}"][param]
if model == 'File'
return File.open(File.join(__dir__, "..", "v" + @api_version, obj))
end
@api_client.convert_to_type(obj, model, "V#{@api_version}")
end
end
Expand Down
2 changes: 1 addition & 1 deletion features/v2/organizations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: Organizations
When the request is sent
Then the response status is 400 Bad Request

@skip-go @skip-java @skip-python @skip-ruby @skip-terraform-config @skip-typescript @skip-validation @team:DataDog/team-aaa-identity
@integration-only @skip-terraform-config @skip-validation @team:DataDog/team-aaa-identity
Scenario: Upload IdP metadata returns "OK" response
Given request contains "idp_file" parameter with value "fixtures/organizations/saml_configurations/valid_idp_metadata.xml"
When the request is sent
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v1/api/organizations_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def upload_idp_for_org_with_http_info(public_id, idp_file, opts = {})
form_params['idp_file'] = idp_file

# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'IdpResponse'
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog_api_client/v2/api/organizations_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def upload_idp_metadata_with_http_info(opts = {})
form_params['idp_file'] = opts[:'idp_file'] if !opts[:'idp_file'].nil?

# http body (model)
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type]
Expand Down