Class: RspecApiDocumentation::Writers::OpenApiJsonWriter
- Inherits:
-
OpenApiWriter
- Object
- Writer
- OpenApiWriter
- RspecApiDocumentation::Writers::OpenApiJsonWriter
- Defined in:
- lib/rspec_api_documentation/writers/open_api_json_writer.rb
Instance Attribute Summary
Attributes inherited from OpenApiWriter
Instance Method Summary collapse
Methods inherited from OpenApiWriter
#configs, #default_configs, #defined_configs, #get_hash, #get_properties, #hash_deep_assign, #info, #servers
Instance Method Details
#write ⇒ Object
4 5 6 7 8 |
# File 'lib/rspec_api_documentation/writers/open_api_json_writer.rb', line 4 def write File.open(configuration.docs_dir.join('open_api.json'), 'w') do |f| f.write JSON.pretty_generate(get_hash) end end |