Skip to content
Open
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
1,044 changes: 1,044 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions examples/v2/forms/CreateAndPublishForm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Create and publish a form returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_and_publish_form".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new

body = DatadogAPIClient::V2::FormCreateRequest.new({
data: DatadogAPIClient::V2::FormDataRequest.new({
attributes: DatadogAPIClient::V2::FormDataAttributesRequest.new({
data_definition: {},
description: "test description",
name: "test form happy path",
ui_definition: {},
}),
id: "00000000-0000-0000-0000-000000000000",
type: DatadogAPIClient::V2::FormType::FORMS,
}),
})
p api_instance.create_and_publish_form(body)
21 changes: 21 additions & 0 deletions examples/v2/forms/CreateForm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Create a new form returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_form".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new

body = DatadogAPIClient::V2::FormCreateRequest.new({
data: DatadogAPIClient::V2::FormDataRequest.new({
attributes: DatadogAPIClient::V2::FormDataAttributesRequest.new({
data_definition: {},
description: "test description",
name: "test form happy path",
ui_definition: {},
}),
id: "00000000-0000-0000-0000-000000000000",
type: DatadogAPIClient::V2::FormType::FORMS,
}),
})
p api_instance.create_form(body)
8 changes: 8 additions & 0 deletions examples/v2/forms/DeleteForm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Delete a form returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_form".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new
p api_instance.delete_form("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
8 changes: 8 additions & 0 deletions examples/v2/forms/GetForm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get a form returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_form".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new
p api_instance.get_form("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d")
8 changes: 8 additions & 0 deletions examples/v2/forms/ListForms.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List all forms returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_forms".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new
p api_instance.list_forms()
17 changes: 17 additions & 0 deletions examples/v2/forms/PublishForm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Publish a form returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.publish_form".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new

body = DatadogAPIClient::V2::FormPublicationRequest.new({
data: DatadogAPIClient::V2::FormPublicationDataRequest.new({
attributes: DatadogAPIClient::V2::FormPublicationAttributes.new({
version: 1,
}),
type: DatadogAPIClient::V2::FormPublicationType::FORM_PUBLICATIONS,
}),
})
p api_instance.publish_form("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
17 changes: 17 additions & 0 deletions examples/v2/forms/SubmitForm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Submit a form returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.submit_form".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new

body = DatadogAPIClient::V2::FormSubmissionRequest.new({
data: DatadogAPIClient::V2::FormSubmissionDataRequest.new({
attributes: DatadogAPIClient::V2::FormSubmissionAttributes.new({
submission_data: {},
}),
type: DatadogAPIClient::V2::FormSubmissionType::FORM_SUBMISSIONS,
}),
})
p api_instance.submit_form("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
21 changes: 21 additions & 0 deletions examples/v2/forms/UpdateForm.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Update a form returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_form".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new

body = DatadogAPIClient::V2::FormUpdateRequest.new({
data: DatadogAPIClient::V2::FormUpdateDataRequest.new({
attributes: DatadogAPIClient::V2::FormUpdateAttributes.new({
form_update: DatadogAPIClient::V2::FormUpdateAttributesFormUpdate.new({
description: "Updated description",
name: "New Form Name",
}),
}),
id: "00000000-0000-0000-0000-000000000000",
type: DatadogAPIClient::V2::FormType::FORMS,
}),
})
p api_instance.update_form("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
25 changes: 25 additions & 0 deletions examples/v2/forms/UpsertAndPublishFormVersion.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Upsert and publish a form version returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.upsert_and_publish_form_version".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new

body = DatadogAPIClient::V2::FormVersionRequest.new({
data: DatadogAPIClient::V2::FormVersionDataRequest.new({
attributes: DatadogAPIClient::V2::FormVersionAttributes.new({
data_definition: {
"updated": "true",
},
state: DatadogAPIClient::V2::FormVersionState::DRAFT,
ui_definition: {},
upsert_params: DatadogAPIClient::V2::FormVersionUpsertParams.new({
etag: "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d",
match_policy: "none",
}),
}),
type: DatadogAPIClient::V2::FormVersionType::FORM_VERSIONS,
}),
})
p api_instance.upsert_and_publish_form_version("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
25 changes: 25 additions & 0 deletions examples/v2/forms/UpsertFormVersion.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Create a form version returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.upsert_form_version".to_sym] = true
end
api_instance = DatadogAPIClient::V2::FormsAPI.new

body = DatadogAPIClient::V2::FormVersionRequest.new({
data: DatadogAPIClient::V2::FormVersionDataRequest.new({
attributes: DatadogAPIClient::V2::FormVersionAttributes.new({
data_definition: {
"updated": "true",
},
state: DatadogAPIClient::V2::FormVersionState::DRAFT,
ui_definition: {},
upsert_params: DatadogAPIClient::V2::FormVersionUpsertParams.new({
etag: "b51f08b698d88d8027a935d9db649774949f5fb41a0c559bfee6a9a13225c72d",
match_policy: "none",
}),
}),
type: DatadogAPIClient::V2::FormVersionType::FORM_VERSIONS,
}),
})
p api_instance.upsert_form_version("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
37 changes: 37 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,43 @@
"v2.GetEvent" => {
"event_id" => "String",
},
"v2.ListForms" => {
"name" => "String",
},
"v2.CreateForm" => {
"body" => "FormCreateRequest",
},
"v2.CreateAndPublishForm" => {
"body" => "FormCreateRequest",
},
"v2.DeleteForm" => {
"form_id" => "UUID",
},
"v2.GetForm" => {
"form_id" => "UUID",
"version" => "Integer",
"published_version" => "Boolean",
},
"v2.UpdateForm" => {
"form_id" => "UUID",
"body" => "FormUpdateRequest",
},
"v2.PublishForm" => {
"form_id" => "UUID",
"body" => "FormPublicationRequest",
},
"v2.SubmitForm" => {
"form_id" => "UUID",
"body" => "FormSubmissionRequest",
},
"v2.UpsertFormVersion" => {
"form_id" => "UUID",
"body" => "FormVersionRequest",
},
"v2.UpsertAndPublishFormVersion" => {
"form_id" => "UUID",
"body" => "FormVersionRequest",
},
"v2.CreateHamrOrgConnection" => {
"body" => "HamrOrgConnectionRequest",
},
Expand Down
Loading
Loading