Class: Dry::Doc::Schema::Field
- Inherits:
-
Struct
- Object
- Struct
- Dry::Doc::Schema::Field
- Defined in:
- lib/dry/doc/schema.rb
Instance Method Summary collapse
Instance Method Details
#as_json ⇒ Object
11 12 13 14 15 16 |
# File 'lib/dry/doc/schema.rb', line 11 def as_json ast = type.respond_to?(:to_ast) ? type.to_ast : type base = walk_ast(ast, {}) base[:description] = description if description base end |