Class: Eazypi::MediaType
Overview
OpenaAPI spec MediaTypeObject
Instance Method Summary
collapse
Methods included from SpecObject
included, #initialize, #load
Instance Method Details
#collect_components(schemas: nil, **kwargs) ⇒ Object
10
11
12
13
14
15
|
# File 'lib/eazypi/media_type.rb', line 10
def collect_components(schemas: nil, **kwargs)
return unless schema
schema.collect_components(schemas: schemas, **kwargs)
schemas&.call(schema)
end
|
#to_openapi_spec ⇒ Object
17
18
19
20
21
|
# File 'lib/eazypi/media_type.rb', line 17
def to_openapi_spec
{
"schema" => schema.to_openapi_spec
}
end
|