module Dry::Schema::OpenAPI::SchemaMethods
Public Instance Methods
open_api(loose: false)
click to toggle source
Convert the schema into a JSON schema hash
@param [Symbol] loose Compile the schema in “loose” mode
@return [Hash<Symbol=>Hash>]
@api public
# 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