Class: R2OAS::Schema::V3::ServerObject

Inherits:
BaseObject show all
Defined in:
lib/r2-oas/schema/v3/object/from_routes/server_object.rb

Instance Method Summary collapse

Methods inherited from BaseObject

#components_object_class, #components_request_body_object_class, #components_schema_object_class, #external_document_object_class, #info_object_class, #initialize, #path_item_object_class, #paths_object_class

Constructor Details

This class inherits a constructor from R2OAS::Schema::V3::BaseObject

Instance Method Details

#to_docObject



9
10
11
12
13
14
15
16
17
# File 'lib/r2-oas/schema/v3/object/from_routes/server_object.rb', line 9

def to_doc
  server.data.each_with_object([]) do |server, result|
    result.push(
      'url' => (server[:url]).to_s,
      'description' => (server[:description]).to_s
    )
    # Do not Server Variable Object
  end
end