Module: Html2rss::Config::Schema::Components
- Defined in:
- lib/html2rss/config/schema.rb
Overview
Exposes schema fragments that populate the top-level configuration schema.
Class Method Summary collapse
-
.auto_source ⇒ Hash{Symbol => Object}
Schema fragment for auto_source configuration.
-
.headers ⇒ Hash{Symbol => Object}
Schema fragment for headers.
-
.selectors ⇒ Hash{Symbol => Object}
Schema fragment for selectors configuration.
-
.strategy ⇒ Hash{Symbol => Object}
Schema fragment for strategy selection.
-
.stylesheets ⇒ Hash{Symbol => Object}
Schema fragment for stylesheet definitions.
Class Method Details
.auto_source ⇒ Hash{Symbol => Object}
Returns schema fragment for auto_source configuration.
125 126 127 128 129 |
# File 'lib/html2rss/config/schema.rb', line 125 def auto_source schema = Html2rss::AutoSource::Config.json_schema(loose: true) schema[:default] = DeepStringifier.call(Html2rss::AutoSource::DEFAULT_CONFIG) schema end |
.headers ⇒ Hash{Symbol => Object}
Returns schema fragment for headers.
107 108 109 110 111 112 113 |
# File 'lib/html2rss/config/schema.rb', line 107 def headers { type: 'object', description: 'HTTP headers applied to every request.', additionalProperties: { type: 'string' } } end |
.selectors ⇒ Hash{Symbol => Object}
Returns schema fragment for selectors configuration.
132 133 134 |
# File 'lib/html2rss/config/schema.rb', line 132 def selectors Selectors.schema end |
.strategy ⇒ Hash{Symbol => Object}
Returns schema fragment for strategy selection.
99 100 101 102 103 104 |
# File 'lib/html2rss/config/schema.rb', line 99 def strategy { type: 'string', not: { type: 'null' } } end |
.stylesheets ⇒ Hash{Symbol => Object}
Returns schema fragment for stylesheet definitions.
116 117 118 119 120 121 122 |
# File 'lib/html2rss/config/schema.rb', line 116 def stylesheets { type: 'array', description: 'Collection of stylesheets to attach to the RSS feed.', items: Html2rss::Config::Validator::StylesheetConfig.json_schema(loose: true) } end |