Skip to content

Commit

Permalink
nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
jirikuncar committed Feb 3, 2022
1 parent 9ba55ae commit c27f423
Show file tree
Hide file tree
Showing 46 changed files with 102 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .generator/src/generator/templates/model_generic.j2
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
# @!visibility private
def self.openapi_nullable
Set.new([
{%- for attr, spec in model.properties.items() if spec.nullable %}
:'{{ attr|attribute_name }}'{% if not loop.last %},{% endif %}
{%- endfor %}
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'name'
])
end

Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/v1/models/dashboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,11 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'author_name',
:'description',
:'notify_list',
:'template_variable_presets',
:'template_variables'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'description'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'available_values',
:'default',
:'prefix'
])
end

Expand Down
7 changes: 7 additions & 0 deletions lib/datadog_api_client/v1/models/downtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'active_child',
:'canceled',
:'_end',
:'monitor_id',
:'parent_id',
:'recurrence',
:'updater_id'
])
end

Expand Down
6 changes: 6 additions & 0 deletions lib/datadog_api_client/v1/models/downtime_child.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'canceled',
:'_end',
:'monitor_id',
:'parent_id',
:'recurrence',
:'updater_id'
])
end

Expand Down
3 changes: 3 additions & 0 deletions lib/datadog_api_client/v1/models/downtime_recurrence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'until_date',
:'until_occurrences',
:'week_days'
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/logs_url_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'normalize_ending_slashes'
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/metrics_query_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'aggr'
])
end

Expand Down
3 changes: 3 additions & 0 deletions lib/datadog_api_client/v1/models/monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'deleted',
:'priority',
:'restricted_roles'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'last_triggered_ts'
])
end

Expand Down
11 changes: 11 additions & 0 deletions lib/datadog_api_client/v1/models/monitor_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'evaluation_delay',
:'min_failure_duration',
:'min_location_failed',
:'new_group_delay',
:'new_host_delay',
:'no_data_timeframe',
:'renotify_interval',
:'renotify_occurrences',
:'renotify_statuses',
:'synthetics_check_id',
:'timeout_h'
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/monitor_search_result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'last_triggered_ts'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'recovery_window',
:'trigger_window'
])
end

Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/v1/models/monitor_thresholds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'critical_recovery',
:'ok',
:'unknown',
:'warning',
:'warning_recovery'
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/monitor_update_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'deleted'
])
end

Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/v1/models/notebook_author.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'name',
:'title'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'time'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'time'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'time'
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/notebook_metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'type'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'time'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'time'
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/series.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'interval'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'description'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'description'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'duration',
:'modifier',
:'rrule'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'unit'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'plural',
:'short_name'
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/slo_response_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'description'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'batch_id'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'aas_host_count',
:'azure_host_count',
:'compliance_host_count',
:'container_count',
:'host_count'
])
end

Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/v1/models/usage_rum_units_hour.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'rum_units'
])
end

Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/v1/models/webhooks_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'custom_headers',
:'payload'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'payload'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'scopes'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'scopes'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'scopes'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'value'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'value'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'customer_impact_end',
:'customer_impact_scope',
:'customer_impact_start',
:'detected',
:'notification_handles',
:'resolved'
])
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ def self.openapi_types
# @!visibility private
def self.openapi_nullable
Set.new([
:'customer_impact_end',
:'customer_impact_start',
:'detected',
:'resolved'
])
end

Expand Down
Loading

0 comments on commit c27f423

Please sign in to comment.