Skip to content

Handle Date input #2

@Kalzem

Description

@Kalzem

Thanks for the package.

My only issue is that it doesn't work well with zod Date input and gives me this error:

Error converting schema: 250 |         throw new Error("Function types cannot be represented in JSON Schema");
251 |     }
252 | };
253 | export const transformProcessor = (_schema, ctx, _json, _params) => {
254 |     if (ctx.unrepresentable === "throw") {
255 |         throw new Error("Transforms cannot be represented in JSON Schema");
                        ^
error: Transforms cannot be represented in JSON Schema

I guess this can be expected as dates are not jsonable by default, however the dates are usually sent as ISO formatted strings, so it would be nice for trpc-docs-generator to handle those inputs as strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions