Class: JSONSchemer::Configuration

Inherits:
Struct
  • Object
show all
Defined in:
lib/json_schemer/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_uri: URI('json-schemer://schema'), meta_schema: Draft202012::BASE_URI.to_s, vocabulary: nil, format: true, formats: {}, content_encodings: {}, content_media_types: {}, keywords: {}, before_property_validation: [], after_property_validation: [], insert_property_defaults: false, property_default_resolver: nil, ref_resolver: proc { |uri| raise UnknownRef, uri.to_s }, regexp_resolver: 'ruby', output_format: 'classic', resolve_enumerators: false, access_mode: nil) ⇒ Configuration



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/json_schemer/configuration.rb', line 10

def initialize(
  base_uri: URI('json-schemer://schema'),
  meta_schema: Draft202012::BASE_URI.to_s,
  vocabulary: nil,
  format: true,
  formats: {},
  content_encodings: {},
  content_media_types: {},
  keywords: {},
  before_property_validation: [],
  after_property_validation: [],
  insert_property_defaults: false,
  property_default_resolver: nil,
  ref_resolver: proc { |uri| raise UnknownRef, uri.to_s },
  regexp_resolver: 'ruby',
  output_format: 'classic',
  resolve_enumerators: false,
  access_mode: nil
)
  super
end

Instance Attribute Details

#access_modeObject

Returns the value of attribute access_mode



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def access_mode
  @access_mode
end

#after_property_validationObject

Returns the value of attribute after_property_validation



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def after_property_validation
  @after_property_validation
end

#base_uriObject

Returns the value of attribute base_uri



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def base_uri
  @base_uri
end

#before_property_validationObject

Returns the value of attribute before_property_validation



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def before_property_validation
  @before_property_validation
end

#content_encodingsObject

Returns the value of attribute content_encodings



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def content_encodings
  @content_encodings
end

#content_media_typesObject

Returns the value of attribute content_media_types



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def content_media_types
  @content_media_types
end

#formatObject

Returns the value of attribute format



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def format
  @format
end

#formatsObject

Returns the value of attribute formats



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def formats
  @formats
end

#insert_property_defaultsObject

Returns the value of attribute insert_property_defaults



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def insert_property_defaults
  @insert_property_defaults
end

#keywordsObject

Returns the value of attribute keywords



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def keywords
  @keywords
end

#meta_schemaObject

Returns the value of attribute meta_schema



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def meta_schema
  @meta_schema
end

#output_formatObject

Returns the value of attribute output_format



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def output_format
  @output_format
end

#property_default_resolverObject

Returns the value of attribute property_default_resolver



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def property_default_resolver
  @property_default_resolver
end

#ref_resolverObject

Returns the value of attribute ref_resolver



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def ref_resolver
  @ref_resolver
end

#regexp_resolverObject

Returns the value of attribute regexp_resolver



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def regexp_resolver
  @regexp_resolver
end

#resolve_enumeratorsObject

Returns the value of attribute resolve_enumerators



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def resolve_enumerators
  @resolve_enumerators
end

#vocabularyObject

Returns the value of attribute vocabulary



4
5
6
# File 'lib/json_schemer/configuration.rb', line 4

def vocabulary
  @vocabulary
end