class Insights::API::Common::OpenApi::Docs::ObjectDefinition
Public Instance Methods
all_attributes()
click to toggle source
# File lib/insights/api/common/open_api/docs/object_definition.rb, line 7 def all_attributes properties.map { |key, val| all_attributes_recursive(key, val) } end
properties()
click to toggle source
# File lib/insights/api/common/open_api/docs/object_definition.rb, line 19 def properties self["properties"] end
read_only_attributes()
click to toggle source
# File lib/insights/api/common/open_api/docs/object_definition.rb, line 11 def read_only_attributes properties.select { |k, v| v["readOnly"] == true }.keys end
required_attributes()
click to toggle source
# File lib/insights/api/common/open_api/docs/object_definition.rb, line 15 def required_attributes self["required"] end
Private Instance Methods
all_attributes_recursive(key, value)
click to toggle source
# File lib/insights/api/common/open_api/docs/object_definition.rb, line 25 def all_attributes_recursive(key, value) if value["properties"] { key => value["properties"].map { |k, v| all_attributes_recursive(k, v) } } else key end end