class OpenApi::Example

github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#exampleObject

Attributes

description[RW]
external_value[RW]
summary[RW]
value[RW]

Public Class Methods

load(hash) click to toggle source
# File lib/open_api/example.rb, line 13
def self.load(hash)
  return unless hash

  new(
    summary: hash["summary"]&.to_s,
    description: hash["description"]&.to_s,
    value: hash["value"],
    external_value: hash["externalValue"],
  )
end
new(summary: nil, description: nil, value: nil, external_value: nil) click to toggle source
# File lib/open_api/example.rb, line 6
def initialize(summary: nil, description: nil, value: nil, external_value: nil)
  self.summary = summary
  self.description = description
  self.value = value
  self.external_value = external_value
end