Class: Rage::CLI::OpenAPI
Instance Method Summary collapse
Instance Method Details
#validate ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rage/cli/openapi.rb', line 6 def validate environment abort "OpenAPI validation requires a booted application." unless Rage.config.internal.initialized? warnings = Rage::OpenAPI.__collect_warnings { Rage::OpenAPI.build } if warnings.any? abort "#{set_color("𐄂", :red, :bold)} OpenAPI validation failed with #{warnings.size} warning(s)." else say "#{set_color("✓", :green, :bold)} OpenAPI validation passed without warnings." end end |