Skip to content

toJsonSchema() fails when a field is string.url #1475

Closed

Description

@esemplare

Report a bug

When configuring a type to have a field using the string.url keyword; toJsonSchema method fails.

ToJsonSchemaError
{ code: "predicate", base: { type: "string" }, predicate: Function(predicate8) }

🔎 Search Terms

jsonschema

🧩 Context

  • ArkType version: 2.1.20
  • TypeScript version (5.1+): 5.8.3
  • Other context you think may be relevant (JS flavor, OS, etc.):

🧑‍💻 Repro

Playground Link: https://arktype.io/playground?code=import%2520%257B%2520type%2520%257D%2520from%2520%2522arktype%2522%250A%250Aconst%2520Thing%2520%253D%2520type%28%257B%250A%2509url%253A%2520%2522string.url%2522%252C%250A%257D%29.toJsonSchema%28%29%253B%250A%250Aout%2520%253D%2520Thing%250A

import { type } from "arktype"

const Thing = type({
	url: "string.url",
}).toJsonSchema();

out = Thing

Activity

  1. added
    bug
    on Jul 3, 2025
  2. Kenpal-ElenaTokumura commented on Sep 20, 2025

    @Kenpal-ElenaTokumura

    The same issue is still occurring.

  3. ElasticBottle commented on Jan 24, 2026

    @ElasticBottle

    came here to say the same, is there a workaround for now?

  4. ssalbdivad commented on Nov 18, 2026

    @ssalbdivad
    Member

    Fixed in 3.0.0-beta.0 (#1728). Try it with npm i arktype@next.

  5. moved this from To do to Done (merged or closed) in arktypeioon Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

  • Status
    Done (merged or closed)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions