Class: OpenapiSdkGenerator::CLI
- Inherits:
-
Object
- Object
- OpenapiSdkGenerator::CLI
- Defined in:
- lib/openapi_sdk_generator.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ CLI
constructor
A new instance of CLI.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ CLI
Returns a new instance of CLI.
15 16 17 |
# File 'lib/openapi_sdk_generator.rb', line 15 def initialize() = end |
Instance Method Details
#run ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/openapi_sdk_generator.rb', line 19 def run puts " Parsing OpenAPI specification..." parser = Parser.new([:input]) puts "Generating #{@options[:language]} SDK..." generator = create_generator([:language], parser) puts " Writing files to #{@options[:output]}..." generator.write_to_directory([:output]) puts " SDK generated successfully!" puts "Output directory: #{@options[:output]}" rescue => e puts " Error: #{e.message}" exit 1 end |