Skip to content

[to-json-schema] "min_value" action is not supported on type "integer"Β #1339

@stefanprobst

Description

@stefanprobst

continued from discussion in #1338

i see a The "min_value" action is not supported on type "integer" warning when transforming the following schema - although the json schema output looks ok to me:

import { toJsonSchema } from "@valibot/to-json-schema";
import * as v from "valibot";

const schema = v.pipe(v.number(), v.integer(), v.minValue(1));

console.log(toJsonSchema(schema, { errorMode: "warn" }));

Output:

The "min_value" action is not supported on type "integer".
{
  '$schema': 'http://json-schema.org/draft-07/schema#',
  type: 'integer',
  minimum: 1
}

Metadata

Metadata

Assignees

Labels

fixA smaller enhancement or bug fix

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions