Module: OpenapiFirst::JsonRefs::Loader
- Defined in:
- lib/openapi_first/json_refs.rb
Class Method Summary collapse
Class Method Details
.handle(filename) ⇒ Object
62 63 64 65 66 67 |
# File 'lib/openapi_first/json_refs.rb', line 62 def handle(filename) body = File.read(filename) return JSON.parse(body) if File.extname(filename) == '.json' YAML.unsafe_load(body) end |