Class: Insights::API::Common::OpenApi::Docs::ObjectDefinition

Inherits:
Hash
  • Object
show all
Defined in:
lib/insights/api/common/open_api/docs/object_definition.rb

Instance Method Summary collapse

Instance Method Details

#all_attributesObject



7
8
9
# 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

#propertiesObject



19
20
21
# File 'lib/insights/api/common/open_api/docs/object_definition.rb', line 19

def properties
  self["properties"]
end

#read_only_attributesObject



11
12
13
# 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_attributesObject



15
16
17
# File 'lib/insights/api/common/open_api/docs/object_definition.rb', line 15

def required_attributes
  self["required"]
end