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
}

0 commit comments

Comments
 (0)