module NxtSchema::Dsl
Constants
- DEFAULT_OPTIONS
Public Instance Methods
any_of(name = :roots, **options, &block)
click to toggle source
# File lib/nxt_schema/dsl.rb, line 27 def any_of(name = :roots, **options, &block) NxtSchema::Template::AnyOf.new( name: name, parent_node: nil, **DEFAULT_OPTIONS.merge(options), &block ) end
collection(name = :root, type: NxtSchema::Template::Collection::DEFAULT_TYPE, **options, &block)
click to toggle source
# File lib/nxt_schema/dsl.rb, line 5 def collection(name = :root, type: NxtSchema::Template::Collection::DEFAULT_TYPE, **options, &block) NxtSchema::Template::Collection.new( name: name, type: type, parent_node: nil, **DEFAULT_OPTIONS.merge(options), &block ) end
Also aliased as: nodes
nodes(name = :root, type: NxtSchema::Template::Collection::DEFAULT_TYPE, **options, &block)
Alias for: collection
params(name = :params, type: NxtSchema::Template::Schema::DEFAULT_TYPE, **options, &block)
click to toggle source
schema root with NxtSchema::Types::Params type system
# File lib/nxt_schema/dsl.rb, line 38 def params(name = :params, type: NxtSchema::Template::Schema::DEFAULT_TYPE, **options, &block) NxtSchema::Template::Schema.new( name: name, type: type, parent_node: nil, **options.merge(type_system: NxtSchema::Types::Params), &block ) end
schema(name = :roots, type: NxtSchema::Template::Schema::DEFAULT_TYPE, **options, &block)
click to toggle source
# File lib/nxt_schema/dsl.rb, line 17 def schema(name = :roots, type: NxtSchema::Template::Schema::DEFAULT_TYPE, **options, &block) NxtSchema::Template::Schema.new( name: name, type: type, parent_node: nil, **DEFAULT_OPTIONS.merge(options), &block ) end