Class: RspecApiDocumentation::Writers::OpenApiYamlWriter

Inherits:
OpenApiWriter
  • Object
show all
Defined in:
lib/rspec_api_documentation/writers/open_api_yaml_writer.rb

Instance Attribute Summary

Attributes inherited from OpenApiWriter

#swagger, #types

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

#writeObject



4
5
6
7
8
# File 'lib/rspec_api_documentation/writers/open_api_yaml_writer.rb', line 4

def write
  File.open(configuration.docs_dir.join("open_api.yaml"), "w") do |f|
    f.write get_hash.to_yaml
  end
end