Skip to content

Commit

Permalink
fix: parse min-max before optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyichv committed Sep 17, 2024
1 parent 75fe686 commit af2440b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sour-pumas-train.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"arke-zod": patch
---

fix: parse min-max before optional
2 changes: 1 addition & 1 deletion src/core/parsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function buildSchemaString(arke: TUnit, parameters: Parameter[]) {
.map((param) => {
const zodStr = [
parseType(param),
parseRequired(param),
parseMinMax(param),
parseRequired(param),
].join("");
return `${param.id}: ${zodStr},`;
})
Expand Down

0 comments on commit af2440b

Please sign in to comment.