Class: Html2rss::Config::Schema::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/html2rss/config/schema.rb

Overview

Orchestrates schema assembly from runtime validator contracts plus client-facing overlays. rubocop:disable Metrics/ClassLength -- overlay assembly stays in one builder

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.callHash{String => Object}

Returns fully assembled JSON schema hash.

Returns:

  • (Hash{String => Object})

    fully assembled JSON schema hash



55
56
57
# File 'lib/html2rss/config/schema.rb', line 55

def call
  new.call
end

Instance Method Details

#callHash{String => Object}

Returns fully assembled JSON schema hash.

Returns:

  • (Hash{String => Object})

    fully assembled JSON schema hash



61
62
63
64
65
66
67
68
# File 'lib/html2rss/config/schema.rb', line 61

def call
  schema = validator_schema
  apply_top_level(schema)
  schema[:$defs] = registry_catalog_defs
  schema.fetch(:properties).merge!(overlay)
  schema.fetch(:properties).delete(:dynamic_params_error)
  HashUtil.deep_stringify_keys(schema)
end