Class: Swagui::JsonSchemaParser

Inherits:
Object
  • Object
show all
Defined in:
lib/swagui/json_schema_parser.rb

Class Method Summary collapse

Class Method Details

.parse(file, prefix = "") ⇒ Object

returns a hash of interlinked models the first one is the root



6
7
8
9
# File 'lib/swagui/json_schema_parser.rb', line 6

def self.parse(file, prefix = "")
  schema_json = JSON.load(File.open(file).read)
  JsonSchema.new(schema_json, prefix)
end