Support app-configured defaults in local FeedReader APIs #25

Open
opened 2026-10-27 23:41:34 +00:00 by mmacia · 0 comments
Owner

Goal

Allow FeedReader callers to configure library defaults through config :feed_reader, :options, [...], with per-call options taking precedence over config and existing defaults.

Scope

  • Add a shared resolver that reads Application.get_env(:feed_reader, :options, []) and merges call options over configured options.
  • Apply it to format detection/validation and local parsing, streaming, verified parsing, and collection APIs.
  • Cover :formats, parser limits, and configured :max_items.
  • Keep :max_items required when absent from both call options and config; preserve existing option validation/fallback behavior.
  • A call-level :formats value replaces the configured list.

Acceptance

  • Tests cover defaults, configured values, call-level overrides, and relevant local APIs.
  • Keep this PR below 150 changed lines, counting additions and deletions including tests.
## Goal Allow FeedReader callers to configure library defaults through `config :feed_reader, :options, [...]`, with per-call options taking precedence over config and existing defaults. ## Scope - Add a shared resolver that reads `Application.get_env(:feed_reader, :options, [])` and merges call options over configured options. - Apply it to format detection/validation and local parsing, streaming, verified parsing, and collection APIs. - Cover `:formats`, parser limits, and configured `:max_items`. - Keep `:max_items` required when absent from both call options and config; preserve existing option validation/fallback behavior. - A call-level `:formats` value replaces the configured list. ## Acceptance - Tests cover defaults, configured values, call-level overrides, and relevant local APIs. - Keep this PR below 150 changed lines, counting additions and deletions including tests.
mmacia self-assigned this 2026-10-27 23:42:11 +00:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mmacia/feed_reader#25