Module: Dry::Schema::OpenAPI::SchemaMethods
- Defined in:
- lib/dry/schema/extensions/open_api.rb
Instance Method Summary collapse
-
#open_api(loose: false) ⇒ Hash<Symbol=>Hash>
Convert the schema into a JSON schema hash.
Instance Method Details
#open_api(loose: false) ⇒ Hash<Symbol=>Hash>
Convert the schema into a JSON schema hash
19 20 21 22 23 |
# File 'lib/dry/schema/extensions/open_api.rb', line 19 def open_api(loose: false) compiler = SchemaCompiler.new(root: true, loose: loose) compiler.call(to_ast) compiler.to_hash end |