Class: GetApisAPIIDSchemasSchemaIDResponse422

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/schemas.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_dynamic!(d) ⇒ Object



5491
5492
5493
5494
5495
5496
5497
5498
# File 'lib/schemas.rb', line 5491

def self.from_dynamic!(d)
  d = Types::Hash[d]
  new(
    detail:                                             d["detail"],
    title:                                              d["title"],
    get_apis_api_id_schemas_schema_id_response422_type: d["type"],
  )
end

.from_json!(json) ⇒ Object



5500
5501
5502
# File 'lib/schemas.rb', line 5500

def self.from_json!(json)
  from_dynamic!(JSON.parse(json))
end

Instance Method Details

#to_dynamicObject



5504
5505
5506
5507
5508
5509
5510
# File 'lib/schemas.rb', line 5504

def to_dynamic
  {
    "detail" => detail,
    "title"  => title,
    "type"   => get_apis_api_id_schemas_schema_id_response422_type,
  }
end

#to_json(options = nil) ⇒ Object



5512
5513
5514
# File 'lib/schemas.rb', line 5512

def to_json(options = nil)
  JSON.generate(to_dynamic, options)
end