richhollis / swagger-docs

Generates swagger-ui json files for Rails APIs with a simple DSL.
MIT License
749 stars 150 forks source link

allow error handling to ignore a load error when guessing at the path #148

Closed jdoconnor closed 4 years ago

jdoconnor commented 8 years ago

When the process_path code attempts to infer the class name from the file name, it can be incorrect when dealing with namespaced code that falls out of the norm. Catching this allows

class A::B
end

to fail gracefully, along with what was expected (example below)

module A
  class B
  end
end