Class: JSONSchemer::Configuration
- Inherits:
-
Struct
- Object
- Struct
- JSONSchemer::Configuration
- Defined in:
- lib/json_schemer/configuration.rb
Instance Attribute Summary collapse
-
#access_mode ⇒ Object
Returns the value of attribute access_mode.
-
#after_property_validation ⇒ Object
Returns the value of attribute after_property_validation.
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
-
#before_property_validation ⇒ Object
Returns the value of attribute before_property_validation.
-
#content_encodings ⇒ Object
Returns the value of attribute content_encodings.
-
#content_media_types ⇒ Object
Returns the value of attribute content_media_types.
-
#format ⇒ Object
Returns the value of attribute format.
-
#formats ⇒ Object
Returns the value of attribute formats.
-
#insert_property_defaults ⇒ Object
Returns the value of attribute insert_property_defaults.
-
#keywords ⇒ Object
Returns the value of attribute keywords.
-
#meta_schema ⇒ Object
Returns the value of attribute meta_schema.
-
#output_format ⇒ Object
Returns the value of attribute output_format.
-
#property_default_resolver ⇒ Object
Returns the value of attribute property_default_resolver.
-
#ref_resolver ⇒ Object
Returns the value of attribute ref_resolver.
-
#regexp_resolver ⇒ Object
Returns the value of attribute regexp_resolver.
-
#resolve_enumerators ⇒ Object
Returns the value of attribute resolve_enumerators.
-
#vocabulary ⇒ Object
Returns the value of attribute vocabulary.
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
Returns a new instance of Configuration.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/json_schemer/configuration.rb', line 9 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_mode ⇒ Object
Returns the value of attribute access_mode
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def access_mode @access_mode end |
#after_property_validation ⇒ Object
Returns the value of attribute after_property_validation
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def after_property_validation @after_property_validation end |
#base_uri ⇒ Object
Returns the value of attribute base_uri
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def base_uri @base_uri end |
#before_property_validation ⇒ Object
Returns the value of attribute before_property_validation
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def before_property_validation @before_property_validation end |
#content_encodings ⇒ Object
Returns the value of attribute content_encodings
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def content_encodings @content_encodings end |
#content_media_types ⇒ Object
Returns the value of attribute content_media_types
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def content_media_types @content_media_types end |
#format ⇒ Object
Returns the value of attribute format
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def format @format end |
#formats ⇒ Object
Returns the value of attribute formats
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def formats @formats end |
#insert_property_defaults ⇒ Object
Returns the value of attribute insert_property_defaults
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def insert_property_defaults @insert_property_defaults end |
#keywords ⇒ Object
Returns the value of attribute keywords
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def keywords @keywords end |
#meta_schema ⇒ Object
Returns the value of attribute meta_schema
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def @meta_schema end |
#output_format ⇒ Object
Returns the value of attribute output_format
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def output_format @output_format end |
#property_default_resolver ⇒ Object
Returns the value of attribute property_default_resolver
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def property_default_resolver @property_default_resolver end |
#ref_resolver ⇒ Object
Returns the value of attribute ref_resolver
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def ref_resolver @ref_resolver end |
#regexp_resolver ⇒ Object
Returns the value of attribute regexp_resolver
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def regexp_resolver @regexp_resolver end |
#resolve_enumerators ⇒ Object
Returns the value of attribute resolve_enumerators
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def resolve_enumerators @resolve_enumerators end |
#vocabulary ⇒ Object
Returns the value of attribute vocabulary
3 4 5 |
# File 'lib/json_schemer/configuration.rb', line 3 def vocabulary @vocabulary end |