Skip to content

Can't use bigint (and more) with experimental_ArkTypeToJsonSchemaConverter #872

@boredland

Description

@boredland

Environment

@orpc/*@1.8.0
node@22

Reproduction

https://github.com/boredland/orpc-arktype-openapi-repro

Describe the bug

I tried to stick mostly to the docs around openapi, sadly most of my arktype validators didn't work, as soon as I provided "slightly" more complicated validation logic in my schema (like a bigint, transformations, narrows etc. - included some commented-out examples in my repro). Isn't this supposed to work? I know it is marked experimental, so my expectations were not very high, but also I didn't expect it to crash out with simple examples like that and fear I might be doing something wrong.

Additional context

No response

Logs

for example:


file:/.../orpc-arktype-swagger-repro/node_modules/@ark/schema/out/shared/toJsonSchema.js:35
        throw new ToJsonSchema.Error(...args);
              ^

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions