class SoberSwag::Reporting::Output::Described
Add a description onto an object.
Attributes
description[R]
@return [String] description of output
output[R]
@return [Interface] output to describe
Public Class Methods
new(output, description)
click to toggle source
# File lib/sober_swag/reporting/output/described.rb, line 7 def initialize(output, description) @output = output @description = description end
Public Instance Methods
call(value)
click to toggle source
# File lib/sober_swag/reporting/output/described.rb, line 20 def call(value) output.call(value) end
serialize_report(value)
click to toggle source
# File lib/sober_swag/reporting/output/described.rb, line 24 def serialize_report(value) output.serialize_report(value) end
swagger_schema()
click to toggle source
# File lib/sober_swag/reporting/output/described.rb, line 28 def swagger_schema schema, found = output.swagger_schema merged = if schema.key?(:$ref) { allOf: [schema] } else schema end.merge(description: description) [merged, found] end