Skip to content

Commit d0be6c4

Browse files
committed
fix: handle no body responses
1 parent 94d3d9e commit d0be6c4

File tree

1,033 files changed

+7995
-1680
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,033 files changed

+7995
-1680
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { _GET } from "../../../../../../generated/stripe.yaml/v1/entitlements/active_entitlements/[id]/route"
2+
3+
export const GET = _GET(async ({ params, query, body }, respond, context) => {
4+
// TODO: implementation
5+
return respond.withStatus(501).body({ message: "not implemented" } as any)
6+
})
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { _GET } from "../../../../../generated/stripe.yaml/v1/entitlements/active_entitlements/route"
2+
3+
export const GET = _GET(async ({ query, body }, respond, context) => {
4+
// TODO: implementation
5+
return respond.withStatus(501).body({ message: "not implemented" } as any)
6+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {
2+
_GET,
3+
_POST,
4+
} from "../../../../../../generated/stripe.yaml/v1/entitlements/features/[id]/route"
5+
6+
export const GET = _GET(async ({ params, query, body }, respond, context) => {
7+
// TODO: implementation
8+
return respond.withStatus(501).body({ message: "not implemented" } as any)
9+
})
10+
export const POST = _POST(async ({ params, body }, respond, context) => {
11+
// TODO: implementation
12+
return respond.withStatus(501).body({ message: "not implemented" } as any)
13+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {
2+
_GET,
3+
_POST,
4+
} from "../../../../../generated/stripe.yaml/v1/entitlements/features/route"
5+
6+
export const GET = _GET(async ({ query, body }, respond, context) => {
7+
// TODO: implementation
8+
return respond.withStatus(501).body({ message: "not implemented" } as any)
9+
})
10+
export const POST = _POST(async ({ body }, respond, context) => {
11+
// TODO: implementation
12+
return respond.withStatus(501).body({ message: "not implemented" } as any)
13+
})
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { _POST } from "../../../../../generated/stripe.yaml/v1/invoices/create_preview/route"
2+
3+
export const POST = _POST(async ({ body }, respond, context) => {
4+
// TODO: implementation
5+
return respond.withStatus(501).body({ message: "not implemented" } as any)
6+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {
2+
_DELETE,
3+
_GET,
4+
} from "../../../../../../../generated/stripe.yaml/v1/products/[product]/features/[id]/route"
5+
6+
export const DELETE = _DELETE(async ({ params, body }, respond, context) => {
7+
// TODO: implementation
8+
return respond.withStatus(501).body({ message: "not implemented" } as any)
9+
})
10+
export const GET = _GET(async ({ params, query, body }, respond, context) => {
11+
// TODO: implementation
12+
return respond.withStatus(501).body({ message: "not implemented" } as any)
13+
})
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import {
2+
_GET,
3+
_POST,
4+
} from "../../../../../../generated/stripe.yaml/v1/products/[product]/features/route"
5+
6+
export const GET = _GET(async ({ params, query, body }, respond, context) => {
7+
// TODO: implementation
8+
return respond.withStatus(501).body({ message: "not implemented" } as any)
9+
})
10+
export const POST = _POST(async ({ params, body }, respond, context) => {
11+
// TODO: implementation
12+
return respond.withStatus(501).body({ message: "not implemented" } as any)
13+
})

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/advisories/[ghsa_id]/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,7 @@ export const _GET =
7070
throw KoaRuntimeError.HandlerError(err)
7171
})
7272

73-
return Response.json(body, { status })
73+
return body !== undefined
74+
? Response.json(body, { status })
75+
: new Response(undefined, { status })
7476
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/advisories/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,5 +95,7 @@ export const _GET =
9595
throw KoaRuntimeError.HandlerError(err)
9696
})
9797

98-
return Response.json(body, { status })
98+
return body !== undefined
99+
? Response.json(body, { status })
100+
: new Response(undefined, { status })
99101
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app-manifests/[code]/conversions/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,7 @@ export const _POST =
8989
throw KoaRuntimeError.HandlerError(err)
9090
})
9191

92-
return Response.json(body, { status })
92+
return body !== undefined
93+
? Response.json(body, { status })
94+
: new Response(undefined, { status })
9395
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/hook/config/route.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ export const _GET =
7373
throw KoaRuntimeError.HandlerError(err)
7474
})
7575

76-
return Response.json(body, { status })
76+
return body !== undefined
77+
? Response.json(body, { status })
78+
: new Response(undefined, { status })
7779
}
7880

7981
const appsUpdateWebhookConfigForAppBodySchema = z.object({
@@ -115,5 +117,7 @@ export const _PATCH =
115117
throw KoaRuntimeError.HandlerError(err)
116118
})
117119

118-
return Response.json(body, { status })
120+
return body !== undefined
121+
? Response.json(body, { status })
122+
: new Response(undefined, { status })
119123
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/hook/deliveries/[delivery_id]/attempts/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,7 @@ export const _POST =
7878
throw KoaRuntimeError.HandlerError(err)
7979
})
8080

81-
return Response.json(body, { status })
81+
return body !== undefined
82+
? Response.json(body, { status })
83+
: new Response(undefined, { status })
8284
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/hook/deliveries/[delivery_id]/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,7 @@ export const _GET =
7575
throw KoaRuntimeError.HandlerError(err)
7676
})
7777

78-
return Response.json(body, { status })
78+
return body !== undefined
79+
? Response.json(body, { status })
80+
: new Response(undefined, { status })
7981
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/hook/deliveries/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,7 @@ export const _GET =
7878
throw KoaRuntimeError.HandlerError(err)
7979
})
8080

81-
return Response.json(body, { status })
81+
return body !== undefined
82+
? Response.json(body, { status })
83+
: new Response(undefined, { status })
8284
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/installation-requests/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,7 @@ export const _GET =
7979
throw KoaRuntimeError.HandlerError(err)
8080
})
8181

82-
return Response.json(body, { status })
82+
return body !== undefined
83+
? Response.json(body, { status })
84+
: new Response(undefined, { status })
8385
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/installations/[installation_id]/access_tokens/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,7 @@ export const _POST =
101101
throw KoaRuntimeError.HandlerError(err)
102102
})
103103

104-
return Response.json(body, { status })
104+
return body !== undefined
105+
? Response.json(body, { status })
106+
: new Response(undefined, { status })
105107
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/installations/[installation_id]/route.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ export const _GET =
8282
throw KoaRuntimeError.HandlerError(err)
8383
})
8484

85-
return Response.json(body, { status })
85+
return body !== undefined
86+
? Response.json(body, { status })
87+
: new Response(undefined, { status })
8688
}
8789

8890
const appsDeleteInstallationParamSchema = z.object({
@@ -124,5 +126,7 @@ export const _DELETE =
124126
throw KoaRuntimeError.HandlerError(err)
125127
})
126128

127-
return Response.json(body, { status })
129+
return body !== undefined
130+
? Response.json(body, { status })
131+
: new Response(undefined, { status })
128132
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/installations/[installation_id]/suspended/route.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export const _PUT =
8181
throw KoaRuntimeError.HandlerError(err)
8282
})
8383

84-
return Response.json(body, { status })
84+
return body !== undefined
85+
? Response.json(body, { status })
86+
: new Response(undefined, { status })
8587
}
8688

8789
const appsUnsuspendInstallationParamSchema = z.object({
@@ -123,5 +125,7 @@ export const _DELETE =
123125
throw KoaRuntimeError.HandlerError(err)
124126
})
125127

126-
return Response.json(body, { status })
128+
return body !== undefined
129+
? Response.json(body, { status })
130+
: new Response(undefined, { status })
127131
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/installations/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,7 @@ export const _GET =
6868
throw KoaRuntimeError.HandlerError(err)
6969
})
7070

71-
return Response.json(body, { status })
71+
return body !== undefined
72+
? Response.json(body, { status })
73+
: new Response(undefined, { status })
7274
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/app/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,7 @@ export const _GET =
5050
throw KoaRuntimeError.HandlerError(err)
5151
})
5252

53-
return Response.json(body, { status })
53+
return body !== undefined
54+
? Response.json(body, { status })
55+
: new Response(undefined, { status })
5456
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/applications/[client_id]/grant/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,7 @@ export const _DELETE =
7878
throw KoaRuntimeError.HandlerError(err)
7979
})
8080

81-
return Response.json(body, { status })
81+
return body !== undefined
82+
? Response.json(body, { status })
83+
: new Response(undefined, { status })
8284
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/applications/[client_id]/token/route.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ export const _POST =
110110
throw KoaRuntimeError.HandlerError(err)
111111
})
112112

113-
return Response.json(body, { status })
113+
return body !== undefined
114+
? Response.json(body, { status })
115+
: new Response(undefined, { status })
114116
}
115117

116118
const appsResetTokenParamSchema = z.object({ client_id: z.string() })
@@ -156,7 +158,9 @@ export const _PATCH =
156158
throw KoaRuntimeError.HandlerError(err)
157159
})
158160

159-
return Response.json(body, { status })
161+
return body !== undefined
162+
? Response.json(body, { status })
163+
: new Response(undefined, { status })
160164
}
161165

162166
const appsDeleteTokenParamSchema = z.object({ client_id: z.string() })
@@ -202,5 +206,7 @@ export const _DELETE =
202206
throw KoaRuntimeError.HandlerError(err)
203207
})
204208

205-
return Response.json(body, { status })
209+
return body !== undefined
210+
? Response.json(body, { status })
211+
: new Response(undefined, { status })
206212
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/applications/[client_id]/token/scoped/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,7 @@ export const _POST =
9696
throw KoaRuntimeError.HandlerError(err)
9797
})
9898

99-
return Response.json(body, { status })
99+
return body !== undefined
100+
? Response.json(body, { status })
101+
: new Response(undefined, { status })
100102
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/apps/[app_slug]/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,7 @@ export const _GET =
7272
throw KoaRuntimeError.HandlerError(err)
7373
})
7474

75-
return Response.json(body, { status })
75+
return body !== undefined
76+
? Response.json(body, { status })
77+
: new Response(undefined, { status })
7678
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/assignments/[assignment_id]/accepted_assignments/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,7 @@ export const _GET =
7979
throw KoaRuntimeError.HandlerError(err)
8080
})
8181

82-
return Response.json(body, { status })
82+
return body !== undefined
83+
? Response.json(body, { status })
84+
: new Response(undefined, { status })
8385
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/assignments/[assignment_id]/grades/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,7 @@ export const _GET =
7070
throw KoaRuntimeError.HandlerError(err)
7171
})
7272

73-
return Response.json(body, { status })
73+
return body !== undefined
74+
? Response.json(body, { status })
75+
: new Response(undefined, { status })
7476
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/assignments/[assignment_id]/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,7 @@ export const _GET =
7070
throw KoaRuntimeError.HandlerError(err)
7171
})
7272

73-
return Response.json(body, { status })
73+
return body !== undefined
74+
? Response.json(body, { status })
75+
: new Response(undefined, { status })
7476
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/classrooms/[classroom_id]/assignments/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,7 @@ export const _GET =
7979
throw KoaRuntimeError.HandlerError(err)
8080
})
8181

82-
return Response.json(body, { status })
82+
return body !== undefined
83+
? Response.json(body, { status })
84+
: new Response(undefined, { status })
8385
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/classrooms/[classroom_id]/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,7 @@ export const _GET =
7070
throw KoaRuntimeError.HandlerError(err)
7171
})
7272

73-
return Response.json(body, { status })
73+
return body !== undefined
74+
? Response.json(body, { status })
75+
: new Response(undefined, { status })
7476
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/classrooms/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,7 @@ export const _GET =
6666
throw KoaRuntimeError.HandlerError(err)
6767
})
6868

69-
return Response.json(body, { status })
69+
return body !== undefined
70+
? Response.json(body, { status })
71+
: new Response(undefined, { status })
7072
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/codes_of_conduct/[key]/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,7 @@ export const _GET =
7272
throw KoaRuntimeError.HandlerError(err)
7373
})
7474

75-
return Response.json(body, { status })
75+
return body !== undefined
76+
? Response.json(body, { status })
77+
: new Response(undefined, { status })
7678
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/codes_of_conduct/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,7 @@ export const _GET =
5454
throw KoaRuntimeError.HandlerError(err)
5555
})
5656

57-
return Response.json(body, { status })
57+
return body !== undefined
58+
? Response.json(body, { status })
59+
: new Response(undefined, { status })
5860
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/emojis/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,7 @@ export const _GET =
5757
throw KoaRuntimeError.HandlerError(err)
5858
})
5959

60-
return Response.json(body, { status })
60+
return body !== undefined
61+
? Response.json(body, { status })
62+
: new Response(undefined, { status })
6163
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/enterprises/[enterprise]/dependabot/alerts/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,7 @@ export const _GET =
107107
throw KoaRuntimeError.HandlerError(err)
108108
})
109109

110-
return Response.json(body, { status })
110+
return body !== undefined
111+
? Response.json(body, { status })
112+
: new Response(undefined, { status })
111113
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/enterprises/[enterprise]/secret-scanning/alerts/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,7 @@ export const _GET =
105105
throw KoaRuntimeError.HandlerError(err)
106106
})
107107

108-
return Response.json(body, { status })
108+
return body !== undefined
109+
? Response.json(body, { status })
110+
: new Response(undefined, { status })
109111
}

integration-tests/typescript-nextjs/src/generated/api.github.com.yaml/events/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,7 @@ export const _GET =
8787
throw KoaRuntimeError.HandlerError(err)
8888
})
8989

90-
return Response.json(body, { status })
90+
return body !== undefined
91+
? Response.json(body, { status })
92+
: new Response(undefined, { status })
9193
}

0 commit comments

Comments
 (0)