We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cccb1c4 commit 1e23f84Copy full SHA for 1e23f84
src/rest/components/get-rest-code-samples.ts
@@ -206,9 +206,14 @@ export function getGHExample(
206
}
207
208
if (typeof bodyParameters === 'object') {
209
+ // Special handling for gist endpoints - use --input for nested file structures
210
+ const isGistEndpoint =
211
+ operation.requestPath.includes('/gists') &&
212
+ (operation.title === 'Create a gist' || operation.title === 'Update a gist')
213
+
214
// For complex objects with arrays, use --input with JSON
215
const hasArrays = hasNestedArrays(bodyParameters as NestedObjectParameter)
- if (hasArrays) {
216
+ if (hasArrays || isGistEndpoint) {
217
const jsonBody = JSON.stringify(
218
bodyParameters,
219
(key: string, value: any) => {
0 commit comments