Skip to content
Closed
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.4.1.dev11",
"regenerated": "2021-07-20 10:13:11.748010",
"spec_repo_commit": "9c185b5"
"regenerated": "2021-07-21 12:33:34.038866",
"spec_repo_commit": "00e20be"
},
"v2": {
"apigentools_version": "1.4.1.dev11",
"regenerated": "2021-07-20 10:14:02.056296",
"spec_repo_commit": "9c185b5"
"regenerated": "2021-07-21 12:34:20.323630",
"spec_repo_commit": "00e20be"
}
}
}
3 changes: 3 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ docs/MetricsAndMetricTagConfigurations.md
docs/MetricsAndMetricTagConfigurationsResponse.md
docs/Organization.md
docs/OrganizationAttributes.md
docs/OrganizationsResponse.md
docs/OrganizationsType.md
docs/Pagination.md
docs/PartialAPIKey.md
Expand Down Expand Up @@ -547,6 +548,7 @@ lib/datadog_api_client/v2/models/metrics_and_metric_tag_configurations.rb
lib/datadog_api_client/v2/models/metrics_and_metric_tag_configurations_response.rb
lib/datadog_api_client/v2/models/organization.rb
lib/datadog_api_client/v2/models/organization_attributes.rb
lib/datadog_api_client/v2/models/organizations_response.rb
lib/datadog_api_client/v2/models/organizations_type.rb
lib/datadog_api_client/v2/models/pagination.rb
lib/datadog_api_client/v2/models/partial_api_key.rb
Expand Down Expand Up @@ -881,6 +883,7 @@ spec/models/metrics_and_metric_tag_configurations_response_spec.rb
spec/models/metrics_and_metric_tag_configurations_spec.rb
spec/models/organization_attributes_spec.rb
spec/models/organization_spec.rb
spec/models/organizations_response_spec.rb
spec/models/organizations_type_spec.rb
spec/models/pagination_spec.rb
spec/models/partial_api_key_attributes_spec.rb
Expand Down
14 changes: 13 additions & 1 deletion data/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3256,6 +3256,18 @@ components:
description: URL of the site that this organization exists at.
type: string
type: object
OrganizationsResponse:
description: Response containing information about multiple organizations.
properties:
data:
description: Array of returned organizations.
items:
$ref: '#/components/schemas/Organization'
type: array
meta:
$ref: '#/components/schemas/ResponseMetaAttributes'
readOnly: true
type: object
OrganizationsType:
default: orgs
description: Organizations resource type.
Expand Down Expand Up @@ -8702,7 +8714,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/UserResponse'
$ref: '#/components/schemas/OrganizationsResponse'
description: OK
'403':
content:
Expand Down
20 changes: 20 additions & 0 deletions docs/v2/OrganizationsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# DatadogAPIClient::V2::OrganizationsResponse

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **data** | [**Array<Organization>**](Organization.md) | Array of returned organizations. | [optional] |
| **meta** | [**ResponseMetaAttributes**](ResponseMetaAttributes.md) | | [optional] |

## Example

```ruby
require 'datadog_api_client/v2'

instance = DatadogAPIClient::V2::OrganizationsResponse.new(
data: null,
meta: null
)
```

1 change: 1 addition & 0 deletions docs/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ Class | Method | HTTP request | Description
- [DatadogAPIClient::V2::MetricsAndMetricTagConfigurationsResponse](MetricsAndMetricTagConfigurationsResponse.md)
- [DatadogAPIClient::V2::Organization](Organization.md)
- [DatadogAPIClient::V2::OrganizationAttributes](OrganizationAttributes.md)
- [DatadogAPIClient::V2::OrganizationsResponse](OrganizationsResponse.md)
- [DatadogAPIClient::V2::OrganizationsType](OrganizationsType.md)
- [DatadogAPIClient::V2::Pagination](Pagination.md)
- [DatadogAPIClient::V2::PartialAPIKey](PartialAPIKey.md)
Expand Down
8 changes: 4 additions & 4 deletions docs/v2/UsersAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ end

## list_user_organizations

> <UserResponse> list_user_organizations(user_id)
> <OrganizationsResponse> list_user_organizations(user_id)

Get a user organization. Returns the user information and all organizations
joined by this user.
Expand All @@ -282,15 +282,15 @@ end

This returns an Array which contains the response data, status code and headers.

> <Array(<UserResponse>, Integer, Hash)> list_user_organizations_with_http_info(user_id)
> <Array(<OrganizationsResponse>, Integer, Hash)> list_user_organizations_with_http_info(user_id)

```ruby
begin
# Get a user organization
data, status_code, headers = api_instance.list_user_organizations_with_http_info(user_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <UserResponse>
p data # => <OrganizationsResponse>
rescue DatadogAPIClient::V2::APIError => e
puts "Error when calling UsersAPI->list_user_organizations_with_http_info: #{e}"
end
Expand All @@ -304,7 +304,7 @@ end

### Return type

[**UserResponse**](UserResponse.md)
[**OrganizationsResponse**](OrganizationsResponse.md)

### Authorization

Expand Down
7 changes: 4 additions & 3 deletions features/v2/users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ Feature: Users
When the request is sent
Then the response status is 404 Not found

@generated @skip
@skip
Scenario: Get a user organization returns "OK" response
Given new "ListUserOrganizations" request
And request contains "user_id" parameter from "<PATH>"
Given there is a valid "user" in the system
And new "ListUserOrganizations" request
And request contains "user_id" parameter from "user.data.id"
When the request is sent
Then the response status is 200 OK

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
require 'datadog_api_client/v2/models/metrics_and_metric_tag_configurations_response'
require 'datadog_api_client/v2/models/organization'
require 'datadog_api_client/v2/models/organization_attributes'
require 'datadog_api_client/v2/models/organizations_response'
require 'datadog_api_client/v2/models/organizations_type'
require 'datadog_api_client/v2/models/pagination'
require 'datadog_api_client/v2/models/partial_api_key'
Expand Down
6 changes: 3 additions & 3 deletions lib/datadog_api_client/v2/api/users_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def get_user_with_http_info(user_id, opts = {})
# Get a user organization. Returns the user information and all organizations joined by this user.
# @param user_id [String] The ID of the user.
# @param [Hash] opts the optional parameters
# @return [UserResponse]
# @return [OrganizationsResponse]
def list_user_organizations(user_id, opts = {})
data, _status_code, _headers = list_user_organizations_with_http_info(user_id, opts)
data
Expand All @@ -330,7 +330,7 @@ def list_user_organizations(user_id, opts = {})
# Get a user organization. Returns the user information and all organizations joined by this user.
# @param user_id [String] The ID of the user.
# @param [Hash] opts the optional parameters
# @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
# @return [Array<(OrganizationsResponse, Integer, Hash)>] OrganizationsResponse data, response status code and response headers
def list_user_organizations_with_http_info(user_id, opts = {})

if @api_client.config.unstable_operations.has_key?(:list_user_organizations)
Expand Down Expand Up @@ -367,7 +367,7 @@ def list_user_organizations_with_http_info(user_id, opts = {})
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'UserResponse'
return_type = opts[:debug_return_type] || 'OrganizationsResponse'

# auth_names
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
Expand Down
Loading