File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ import { paths } from "./api/v1/my-schema"; // generated by openapi-typescript
8787const BASE_URL = " https://myapi.com/v1" ;
8888// End Settings
8989
90- // type helpers — ignore these; these just make TS lookups better
90+ // type helpers — ignore these; these just make TS lookups better
9191type FilterKeys <Obj , Matchers > = { [K in keyof Obj ]: K extends Matchers ? Obj [K ] : never }[keyof Obj ];
9292type PathResponses <T > = T extends { responses: any } ? T [" responses" ] : unknown ;
9393type 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}
You can’t perform that action at this time.
0 commit comments