Skip to content

Commit

Permalink
Optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
wilmveel committed Dec 7, 2020
1 parent 2b142c2 commit d640d30
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 216 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zod-endpoints",
"version": "0.0.21",
"version": "0.0.22",
"description": "Typescript contract first strictly typed endpoints",
"main": "./lib/cjs/index.js",
"types": "./lib/cjs/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/pets_endpoints.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const schema = z.endpoints([
path: [z.literal("pets")],
query: {
limit: z
.parameter(z.integer("int32").max(100))
.parameter(z.integer("int32").max(100).optional())
.description("How many items to return at one time (max 100)")
},
responses: [
Expand Down
Loading

0 comments on commit d640d30

Please sign in to comment.