Class: SchemaSerializer::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/schema_serializer/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_config_fileObject



5
6
7
# File 'lib/generators/schema_serializer/install/install_generator.rb', line 5

def create_config_file
  copy_file "schema_serializer.rb", "config/initializers/schema_serializer.rb"
end

#create_example_schemaObject



9
10
11
12
13
14
15
# File 'lib/generators/schema_serializer/install/install_generator.rb', line 9

def create_example_schema
  copy_file "schema.yml", "doc/schema.yml"
  copy_file "components/index.yml", "doc/components/index.yml"
  copy_file "components/schemas/index.yml", "doc/components/schemas/index.yml"
  copy_file "components/schemas/User.yml", "doc/components/schemas/User.yml"
  copy_file "components/schemas/Users.yml", "doc/components/schemas/Users.yml"
end