Skip to content

Fix v1 hostname format validation - #151

Open
ary4t wants to merge 1 commit into
hyperjump-io:mainfrom
ary4t:fix/v1-hostname-format
Open

ary4t wants to merge 1 commit into
hyperjump-io:mainfrom
ary4t:fix/v1-hostname-format

Conversation

@ary4t

@ary4t ary4t commented Nov 14, 2026

Copy link
Copy Markdown

Closes #150

Summary

In JSON Schema v1, format: "hostname" is defined without the IDNA A-label clause (unlike draft-07 through draft-2020-12). Hostnames containing -- in positions 3 and 4 (such as "ab--cd.example") are valid RFC 1123 hostnames.

This updates lib/keywords/format.js to map "hostname" to the RFC 1123 handler (https://json-schema.org/format/draft-04/hostname), resolving the test suite failure in v1/json-schema-test-suite.spec.ts.

Verification

  • npm test passes completely (15,265 tests across all 29 test files)
  • npm run lint passes
  • npm run check-types passes

v1 defines hostname without IDNA rules (RFC 1123), allowing '--'
in the 3rd and 4th positions (e.g. 'ab--cd.example'). Point v1 to
the RFC 1123 hostname handler instead of the IDNA handler.
Copilot AI balanced review requested due to automatic review settings November 14, 2026 17:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v1 hostname format validation should not enforce IDNA rules

2 participants