Skip to content

Commit 0b9cc37

Browse files
committed
fix(typescript): include a header object when transforming Content-Type and Content-Length to headers.content-type and headers.content-length
1 parent ebea33d commit 0b9cc37

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/lib/get-routes.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@ function getRoutes () {
5454
indexes.forEach(i => endpoint.params.splice(i, 1))
5555
endpoint.params.unshift(
5656
Object.assign(contentLengthParam, { name: 'headers.content-length' }),
57-
Object.assign(contentTypeParam, { name: 'headers.content-type' })
57+
Object.assign(contentTypeParam, { name: 'headers.content-type' }),
58+
{
59+
name: 'headers',
60+
location: 'headers',
61+
required: true,
62+
type: 'object',
63+
description: 'Request headers containing `content-type` and `content-length`'
64+
}
5865
)
5966
}
6067

0 commit comments

Comments
 (0)