Skip to content

Commit 8e02a1b

Browse files
authored
Update advanced.md (#1362)
1 parent b568808 commit 8e02a1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/src/content/docs/advanced.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ import { paths } from "./api/v1/my-schema"; // generated by openapi-typescript
8787
const BASE_URL = "https://myapi.com/v1";
8888
// End Settings
8989

90-
// type helpers — ignore these; these just make TS lookups better
90+
// type helpersignore these; these just make TS lookups better
9191
type FilterKeys<Obj, Matchers> = { [K in keyof Obj]: K extends Matchers ? Obj[K] : never }[keyof Obj];
9292
type PathResponses<T> = T extends { responses: any } ? T["responses"] : unknown;
9393
type OperationContent<T> = T extends { content: any } ? T["content"] : unknown;
@@ -121,6 +121,7 @@ export function mockResponses(responses: {
121121
}
122122
const { status, body } = (responses as any)[mockedPath][method];
123123
return { status, body: JSON.stringify(body) };
124+
})
124125
}
125126

126127
// helper function that matches a realistic URL (/users/123) to an OpenAPI path (/users/{user_id}

0 commit comments

Comments
 (0)