···2424 };
2525};
26262727-export type ListPetsError = Error;
2727+export type ListPetsErrors = {
2828+ /**
2929+ * unexpected error
3030+ */
3131+ default: Error;
3232+};
3333+3434+export type ListPetsError = ListPetsErrors[keyof ListPetsErrors];
3535+3636+export type ListPetsResponses = {
3737+ /**
3838+ * A paged array of pets
3939+ */
4040+ 200: Pets;
4141+};
4242+4343+export type ListPetsResponse = ListPetsResponses[keyof ListPetsResponses];
4444+4545+export type CreatePetsErrors = {
4646+ /**
4747+ * unexpected error
4848+ */
4949+ default: Error;
5050+};
28512929-export type ListPetsResponse = Pets;
5252+export type CreatePetsError = CreatePetsErrors[keyof CreatePetsErrors];
30533131-export type CreatePetsError = Error;
5454+export type CreatePetsResponses = {
5555+ /**
5656+ * Null response
5757+ */
5858+ 201: unknown;
5959+};
32603361export type ShowPetByIdData = {
3462 body?: never;
···4169 query?: never;
4270};
43714444-export type ShowPetByIdError = Error;
7272+export type ShowPetByIdErrors = {
7373+ /**
7474+ * unexpected error
7575+ */
7676+ default: Error;
7777+};
45784646-export type ShowPetByIdResponse = Pet;
7979+export type ShowPetByIdError = ShowPetByIdErrors[keyof ShowPetByIdErrors];
8080+8181+export type ShowPetByIdResponses = {
8282+ /**
8383+ * Expected response to a valid request
8484+ */
8585+ 200: Pet;
8686+};
8787+8888+export type ShowPetByIdResponse =
8989+ ShowPetByIdResponses[keyof ShowPetByIdResponses];
+2-1
examples/openapi-ts-fastify/src/handlers.ts
···11-import type { Pet, RouteHandlers } from './client/fastify.gen';
11+import type { RouteHandlers } from './client/fastify.gen';
22+import type { Pet } from './client/types.gen';
2334export const serviceHandlers: Pick<RouteHandlers, 'showPetById'> = {
45 showPetById(request, reply) {