Class: Swgr2rb::SchemaModuleGenerator

Inherits:
RubyFileGenerator show all
Defined in:
lib/endpoint_class_generator/schema_module_generator.rb

Overview

SchemaModuleGenerator generates a Ruby module file for an endpoint object model schema from its config.

Constant Summary

Constants included from RubyFileGeneratorConstants

RubyFileGeneratorConstants::CAMEL_CASE_TO_SNAKE_CASE, RubyFileGeneratorConstants::CLASS_NAME, RubyFileGeneratorConstants::COMMENT_ADD_SUB_RESULTS, RubyFileGeneratorConstants::COMMENT_SET_VALID_VALUES, RubyFileGeneratorConstants::END_POINT_PATH, RubyFileGeneratorConstants::EXPECTED_CODE, RubyFileGeneratorConstants::EXPECTED_SCHEMA, RubyFileGeneratorConstants::GENERATE_BODY, RubyFileGeneratorConstants::GENERATE_HEADERS, RubyFileGeneratorConstants::GET_PARAM_FROM_REQUEST_OPTIONS, RubyFileGeneratorConstants::GET_PARAM_FROM_REQUEST_PARAMS, RubyFileGeneratorConstants::INCLUDES, RubyFileGeneratorConstants::INITIALIZE, RubyFileGeneratorConstants::JSON_VALIDATOR_VALIDATE_SCHEMA, RubyFileGeneratorConstants::MODULE_NAME, RubyFileGeneratorConstants::MULTIPART_REQUEST_BODY, RubyFileGeneratorConstants::RAISE_UNLESS_PARAMS_PASSED, RubyFileGeneratorConstants::REQUIRES, RubyFileGeneratorConstants::SNAKE_CASE_TO_CAMEL_CASE, RubyFileGeneratorConstants::VALIDATE_RESPONSE_SCHEMA

Instance Method Summary collapse

Methods inherited from RubyFileGenerator

#generate_file, #initialize

Constructor Details

This class inherits a constructor from Swgr2rb::RubyFileGenerator

Instance Method Details

#generate_linesObject



10
11
12
13
14
15
# File 'lib/endpoint_class_generator/schema_module_generator.rb', line 10

def generate_lines
  [generate_module_name,
   generate_expected_code_method,
   generate_expected_schema_method,
   'end'].compact.flatten
end