Skip to content

Commit 6e5ea17

Browse files
authored
fix: response data type for Endpoints["POST /markdown"]["response"] (#259)
ref https://github.com/octokit/rest.js/pull/1998
1 parent fe7f641 commit 6e5ea17

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

scripts/update-endpoints/templates/endpoints.ts.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ type MethodsMap = {
7575
type SuccessStatuses = 200 | 201 | 204;
7676
type RedirectStatuses = 301 | 302;
7777
type EmptyResponseStatuses = 201 | 204;
78-
type KnownJsonResponseTypes = "application/json" | "application/scim+json";
78+
type KnownJsonResponseTypes =
79+
| "application/json"
80+
| "application/scim+json"
81+
| "text/html";
7982

8083
type SuccessResponseDataType<Responses> = {
8184
[K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent<

src/generated/Endpoints.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ type MethodsMap = {
7575
type SuccessStatuses = 200 | 201 | 204;
7676
type RedirectStatuses = 301 | 302;
7777
type EmptyResponseStatuses = 201 | 204;
78-
type KnownJsonResponseTypes = "application/json" | "application/scim+json";
78+
type KnownJsonResponseTypes =
79+
| "application/json"
80+
| "application/scim+json"
81+
| "text/html";
7982

8083
type SuccessResponseDataType<Responses> = {
8184
[K in SuccessStatuses & keyof Responses]: GetContentKeyIfPresent<

0 commit comments

Comments
 (0)