Skip to content

Commit 04f56dc

Browse files
chore: basic formatting
1 parent d4ea883 commit 04f56dc

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/__tests__/zodv4.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("zod v4", () => {
2525
schema: resolver(
2626
z.object({
2727
message: z.string(),
28-
})
28+
}),
2929
),
3030
},
3131
},
@@ -35,7 +35,7 @@ describe("zod v4", () => {
3535
validator("json", z.object({ message: z.string() })),
3636
async (c) => {
3737
return c.json({ message: "Hello, world!" });
38-
}
38+
},
3939
);
4040

4141
const specs = await generateSpecs(app);
@@ -60,7 +60,7 @@ describe("zod v4", () => {
6060
.object({
6161
message: z.string(),
6262
})
63-
.meta({ ref: "SuccessResponse" })
63+
.meta({ ref: "SuccessResponse" }),
6464
),
6565
},
6666
},
@@ -70,7 +70,7 @@ describe("zod v4", () => {
7070
validator("json", z.object({ message: z.string() })),
7171
async (c) => {
7272
return c.json({ message: "Hello, world!" });
73-
}
73+
},
7474
);
7575

7676
const specs = await generateSpecs(app);
@@ -119,8 +119,8 @@ describe("zod v4", () => {
119119
},
120120
},
121121
},
122-
}
123-
)
122+
},
123+
),
124124
);
125125

126126
const specs = await generateSpecs(app);
@@ -141,7 +141,7 @@ describe("zod v4", () => {
141141
validator("query", z.object({ q2: z.string() })),
142142
async (c) => {
143143
return c.json({ message: "Hello, world!" });
144-
}
144+
},
145145
);
146146

147147
const specs = await generateSpecs(app);

src/utils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ function mergeSpecs(
153153
},
154154
{
155155
operationId: generateOperationId(route),
156-
}
156+
},
157157
);
158158
}
159159

@@ -192,15 +192,15 @@ export function registerSchemaPath({
192192
route,
193193
...pathContext,
194194
paths[path]?.[method],
195-
specs
195+
specs,
196196
);
197197
}
198198
}
199199
}
200200

201201
export function removeExcludedPaths(
202202
paths: OpenAPIV3_1.PathsObject,
203-
ctx: SpecContext
203+
ctx: SpecContext,
204204
) {
205205
const { exclude, excludeStaticFile } = ctx.options;
206206
const newPaths: OpenAPIV3_1.PathsObject = {};
@@ -240,16 +240,16 @@ export function removeExcludedPaths(
240240
!schema.parameters.find(
241241
(params: Record<string, unknown>) =>
242242
params.in === "path" &&
243-
params.name === x.slice(1, x.length - 1)
244-
)
243+
params.name === x.slice(1, x.length - 1),
244+
),
245245
);
246246

247247
for (const param of pathParameters) {
248248
const paramName = param.slice(1, param.length - 1);
249249

250250
const index = schema.parameters.findIndex(
251251
(
252-
x: OpenAPIV3_1.ParameterObject | OpenAPIV3_1.ReferenceObject
252+
x: OpenAPIV3_1.ParameterObject | OpenAPIV3_1.ReferenceObject,
253253
) => {
254254
if ("$ref" in x) {
255255
const pos = x.$ref.split("/").pop();
@@ -266,7 +266,7 @@ export function removeExcludedPaths(
266266
}
267267

268268
return x.in === "path" && x.name === paramName;
269-
}
269+
},
270270
);
271271

272272
if (index === -1) {

0 commit comments

Comments
 (0)