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

Class Method Details

.auto_sourceObject



109
110
111
112
113
# File 'lib/html2rss/config/schema.rb', line 109

def auto_source
  schema = Html2rss::AutoSource::Config.json_schema(loose: true)
  schema[:default] = DeepStringifier.call(Html2rss::AutoSource::DEFAULT_CONFIG)
  schema
end

.headersObject



93
94
95
96
97
98
99
# File 'lib/html2rss/config/schema.rb', line 93

def headers
  {
    type: 'object',
    description: 'HTTP headers applied to every request.',
    additionalProperties: { type: 'string' }
  }
end

.selectorsObject



115
116
117
# File 'lib/html2rss/config/schema.rb', line 115

def selectors
  Selectors.schema
end

.stylesheetsObject



101
102
103
104
105
106
107
# File 'lib/html2rss/config/schema.rb', line 101

def stylesheets
  {
    type: 'array',
    description: 'Collection of stylesheets to attach to the RSS feed.',
    items: Html2rss::Config::Validator::StylesheetConfig.json_schema(loose: true)
  }
end