Class: RailsOpenapiGen::Checker
- Inherits:
-
Object
- Object
- RailsOpenapiGen::Checker
- Defined in:
- lib/rails-openapi-gen.rb
Instance Method Summary collapse
-
#run ⇒ void
Checks for missing OpenAPI comments and uncommitted changes.
Instance Method Details
#run ⇒ void
This method returns an undefined value.
Checks for missing OpenAPI comments and uncommitted changes
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/rails-openapi-gen.rb', line 52 def run puts "🔍 Checking for missing comments and uncommitted changes..." # Run OpenAPI generation to check for missing comments system('bin/rails openapi:generate') || system('bundle exec rails openapi:generate') # Check for uncommitted changes in openapi directory if system('git diff --quiet docs/api/ 2>/dev/null') puts "✅ All checks passed!" else puts "❌ Found uncommitted changes in OpenAPI files" puts `git diff docs/api/` exit 1 end end |