Sha256: e282f687f26ab94e07d7ef4af9a840c01a95474cd61d3ac6664d9adcba208cb7
Contents?: true
Size: 701 Bytes
Versions: 14
Compression:
Stored size: 701 Bytes
Contents
module Praxis module Docs module OpenApi class ServerObject # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#server-object attr_reader :url, :description, :variables def initialize(url: , description: nil, variables: []) @url = url @description = description @variables = variables raise "OpenApi docs require a 'url' for your server object." unless url end def dump result = {url: url} result[:description] = description if description result[:variables] = variables unless variables.empty? result end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems