Skip to content

Commit 5181f9b

Browse files
authored
refactor(config): drop ZodOverride from PositiveInt in provider.ts (#23215)
1 parent f52ae28 commit 5181f9b

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

packages/opencode/src/config/provider.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { Schema } from "effect"
2-
import z from "zod"
3-
import { zod, ZodOverride } from "@/util/effect-zod"
2+
import { zod } from "@/util/effect-zod"
43
import { withStatics } from "@/util/schema"
54

6-
// Positive integer preserving exact Zod JSON Schema (type: integer, exclusiveMinimum: 0).
7-
const PositiveInt = Schema.Number.annotate({
8-
[ZodOverride]: z.number().int().positive(),
9-
})
5+
// Positive integer: emits JSON Schema `type: integer, exclusiveMinimum: 0`
6+
// via the effect-zod walker's well-known refinement translation.
7+
const PositiveInt = Schema.Number.check(Schema.isInt()).check(Schema.isGreaterThan(0))
108

119
export const Model = Schema.Struct({
1210
id: Schema.optional(Schema.String),

0 commit comments

Comments
 (0)