Skip to content

Commit cd26b94

Browse files
committed
feat: add endpoint descriptions
1 parent 368d3e8 commit cd26b94

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/stainless/src/openapiSpec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export async function openapiSpec(
4747
const lowerMethod = httpMethod.toLowerCase() as "get" | "post" | "delete";
4848
const operation: ZodOpenApiOperationObject = {
4949
summary: route.summary,
50-
description: undefined,
50+
description: route.description,
5151
requestParams: {
5252
path: route.path,
5353
query: route.query,

packages/stainless/src/stl.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ export interface BaseEndpoint<
159159
> {
160160
stl: Stl<any>;
161161
summary?: string;
162+
description?: string;
162163
endpoint: MethodAndUrl;
163164
response: Response;
164165
config: Config;
@@ -551,6 +552,8 @@ interface CreateEndpointOptions<
551552
endpoint: MethodAndUrl;
552553
/** Optional summary for the endpoint. */
553554
summary?: string;
555+
/** Optional description for the endpoint. */
556+
description?: string;
554557
/** Optional plugin configuration specific to the endpoint. */
555558
config?: Config;
556559
/** The schema for the response defining its properties. */

0 commit comments

Comments
 (0)