Skip to content

Fix typo in docs/src/content/docs/advanced.md #1362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/src/content/docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ import { paths } from "./api/v1/my-schema"; // generated by openapi-typescript
const BASE_URL = "https://myapi.com/v1";
// End Settings

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

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