Class: Attributor::Object
- Inherits:
-
Object
- Object
- Attributor::Object
- Includes:
- Type
- Defined in:
- lib/attributor/types/object.rb
Class Method Summary collapse
-
.as_json_schema(**kwargs) ⇒ Object
Represents Object as an OpenAPI Any Type.
- .example(_context = nil, options: {}) ⇒ Object
-
.json_schema_type ⇒ Object
Not really used (we override as_json_schema to represent this as an Any Type), but if it were used, this would be accurate.
- .native_type ⇒ Object
Methods included from Type
get_memoized_collection_class, set_memoized_collection_class
Class Method Details
.as_json_schema(**kwargs) ⇒ Object
Represents Object as an OpenAPI Any Type.
26 27 28 29 30 |
# File 'lib/attributor/types/object.rb', line 26 def self.as_json_schema(**kwargs) schema = super(**kwargs) schema.delete(:type) schema end |
.example(_context = nil, options: {}) ⇒ Object
13 14 15 |
# File 'lib/attributor/types/object.rb', line 13 def self.example(_context = nil, options: {}) 'An Object' end |
.json_schema_type ⇒ Object
Not really used (we override as_json_schema to represent this as an Any Type), but if it were used, this would be accurate.
19 20 21 |
# File 'lib/attributor/types/object.rb', line 19 def self.json_schema_type :object end |
.native_type ⇒ Object
9 10 11 |
# File 'lib/attributor/types/object.rb', line 9 def self.native_type ::BasicObject end |