Class: Fictium::Postman::V2Exporter::InfoFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/fictium/exporters/postman/v2_exporter/info_formatter.rb

Constant Summary collapse

POSTMAN_SCHEMA_URL =
'https://schema.getpostman.com/json/collection/v2.1.0/collection.json'.freeze

Instance Method Summary collapse

Instance Method Details

#format(_document) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/fictium/exporters/postman/v2_exporter/info_formatter.rb', line 10

def format(_document)
  base_info.tap do |result|
    result[:_postman_id] = postman.id if postman.id.present?
    result[:description] = info.description if info.description.present?
    result[:schema] = POSTMAN_SCHEMA_URL
  end
end