Module: ActsAsDoc::Schema
- Defined in:
- lib/acts_as_doc.rb
Overview
Example:
class A
extend ActsAsDoc::Schema
end
>> A.swagger_schema
Instance Method Summary collapse
-
#swagger_schema ⇒ Hash
Swagger schema hash.
Instance Method Details
#swagger_schema ⇒ Hash
Returns Swagger schema hash.
14 15 16 17 18 19 |
# File 'lib/acts_as_doc.rb', line 14 def swagger_schema path = const_source_location(self.name).first parser = ResponseParser.new(File.read(path)) parser.parse parser.schema end |