• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dnsimple / dns_erlang / 21441376739

28 Jan 2026 02:06PM UTC coverage: 84.59% (-0.8%) from 85.422%
21441376739

push

github

web-flow
Modernize DNS Record JSON Transcoding and Add Automated Documentation (#102)

* feat: implement dns_json module for Record <-> JSON transcoding

Replace legacy dns_record/dns_record_info modules with new dns_json
module providing bidirectional conversion between Erlang records and
JSON-friendly maps using a two-level nested structure.

- Add dns_json module with to_map/1 and from_map/1
- Refactor SVCB handling into unified dns_svcb_params module
- Add comprehensive test suite with near 100% coverage
- Remove legacy dns_record, dns_record_info modules and tests
- Update dns_encode, dns_decode, dns_zone to use new modules

* feat: add automated JSON format documentation generation

- Documentation script: Added `scripts/generate_json_docs.escript` that:
  - Parses record definitions from `include/dns_records.hrl` using Erlang AST parsing
  - Extracts encoding rules from `dns_json` function clauses
  - Generates ExDoc-compatible markdown with type links and RFC references
  - Automatically formats field types, encoding descriptions, and JSON examples
  - Custom record ordering (message → query → RRs → OPTs)
- Build integration: Integrated into rebar3 build process via pre_hooks to auto-generate docs
- Module documentation: Linked generated JSON_FORMAT.md as the moduledoc for dns_json module

* Update changelog

483 of 495 new or added lines in 6 files covered. (97.58%)

74 existing lines in 6 files now uncovered.

2569 of 3037 relevant lines covered (84.59%)

8444.08 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.66
/src/dns_encode.erl


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc