Class: Insights::API::Common::OpenApi::Docs::ObjectDefinition
- Inherits:
-
Hash
- Object
- Hash
- Insights::API::Common::OpenApi::Docs::ObjectDefinition
- Defined in:
- lib/insights/api/common/open_api/docs/object_definition.rb
Instance Method Summary collapse
- #all_attributes ⇒ Object
- #properties ⇒ Object
- #read_only_attributes ⇒ Object
- #required_attributes ⇒ Object
Instance Method Details
#all_attributes ⇒ Object
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 |
#properties ⇒ Object
19 20 21 |
# File 'lib/insights/api/common/open_api/docs/object_definition.rb', line 19 def properties self["properties"] end |
#read_only_attributes ⇒ Object
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_attributes ⇒ Object
15 16 17 |
# File 'lib/insights/api/common/open_api/docs/object_definition.rb', line 15 def required_attributes self["required"] end |