File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,16 @@ export function getShellExample(
3939 contentTypeHeader = '-H "Content-Type: multipart/form-data"'
4040 }
4141
42+ // GHES Manage API requests differ from the dotcom API requests and make use of multipart/form-data and json content types
43+ if ( operation . subcategory === 'manage-ghes' ) {
44+ // GET requests don't have a requestBody set, therefore let's default them to application/json
45+ if ( operation . verb === 'get' ) {
46+ contentTypeHeader = '-H "Content-Type: application/json"'
47+ } else {
48+ contentTypeHeader = `-H "Content-Type: ${ codeSample ?. request ?. contentType } "`
49+ }
50+ }
51+
4252 let requestPath = codeSample ?. request ?. parameters
4353 ? parseTemplate ( operation . requestPath ) . expand ( codeSample . request . parameters )
4454 : operation . requestPath
You can’t perform that action at this time.
0 commit comments