Skip to content

Commit 3647233

Browse files
committed
Readme: reflecting changes to examples.
1 parent 589b94c commit 3647233

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,11 @@ const exampleEndpoint = defaultEndpointsFactory.build({
12711271
shortDescription: "Retrieves the user.", // <—— this becomes the summary line
12721272
description: "The detailed explanaition on what this endpoint does.",
12731273
input: z.object({
1274-
id: z.number().describe("the ID of the user").example(123),
1274+
id: z
1275+
.string()
1276+
.example("123") // input examples should be set before transformations
1277+
.transform(Number)
1278+
.describe("the ID of the user"),
12751279
}),
12761280
// ..., similarly for output and middlewares
12771281
});

0 commit comments

Comments
 (0)