class OpenApi::Server

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

Attributes

description[RW]
url[RW]
variables[RW]

Public Class Methods

load(hash) click to toggle source
# File lib/open_api/server.rb, line 14
def self.load(hash)
  new(
    url: hash["url"].to_s,
    description: hash["description"]&.to_s,
    variables: hash["variables"]&.map { |h| ServerVariable.load(h) }
  )
end
new(url:, description: nil, variables: nil) click to toggle source
# File lib/open_api/server.rb, line 8
def initialize(url:, description: nil, variables: nil)
  self.url = url
  self.description = description
  self.variables = variables
end