Sha256: 69348c808e8e407466566ba69eb714aaf2c5c66316193bdf3d05f6a0d8351cfb
Contents?: true
Size: 492 Bytes
Versions: 7
Compression:
Stored size: 492 Bytes
Contents
require 'apiture/version' require 'apiture/swagger/parser' require 'apiture/api_builder' module Apiture def self.parse_specification(path) if path.match(/\.yml$/) Apiture::Swagger::Parser.new.parse_yaml(File.read(path)) else Apiture::Swagger::Parser.new.parse_json(File.read(path)) end end def self.build_api(specification) Apiture::APIBuilder.new(specification).build end def self.load_api(path) build_api(parse_specification(path)) end end
Version data entries
7 entries across 7 versions & 1 rubygems