Skip to content

GitHub: Gists schemas

4 GitHub schemas with complete fields and constraints.

← Gists operations · All schemas

Fork a gist — response body

FieldTypePresenceDescription and constraints
$objectRootBase Gist
commentsJSONRequired within parent
comments (anyOf 1)integerAlternative
comments (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
comments_enabledbooleanOptional
comments_urlstringRequired within parentFormat: uri
commits_urlstringRequired within parentFormat: uri
created_atstringRequired within parentFormat: date-time
descriptionJSONRequired within parent
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
filesobjectRequired within parentAdditional keys: see wildcard field
files.*objectAdditional keys
files.*.encodingstringOptionalThe encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported.
Default: utf-8
files.*.filenamestringOptional
files.*.languagestringOptional
files.*.raw_urlstringOptional
files.*.sizeJSONOptional
files.*.size (anyOf 1)integerAlternative
files.*.size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
files.*.typestringOptional
forks_urlstringRequired within parentFormat: uri
git_pull_urlstringRequired within parentFormat: uri
git_push_urlstringRequired within parentFormat: uri
html_urlstringRequired within parentFormat: uri
idstringRequired within parent
node_idstringRequired within parent
ownerModelOptionalExpand List users — response body — item
publicbooleanRequired within parent
truncatedbooleanOptional
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri

Referenced models: List users — response body — item

Get a gist comment — response body

FieldTypePresenceDescription and constraints
$objectRootA comment made to a gist.
author_associationstringRequired within parentHow the author is associated with the repository.
Known values: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER
bodystringRequired within parentThe comment text.
Maximum length: 65535
created_atstringRequired within parentFormat: date-time
idJSONRequired within parent
id (anyOf 1)integerAlternative
id (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
node_idstringRequired within parent
updated_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri
userModelRequired within parentExpand Get an issue — response body — user

Referenced models: Get an issue — response body — user

Get a gist — response body

FieldTypePresenceDescription and constraints
$objectRootGist Simple
commentsJSONOptional
comments (anyOf 1)integerAlternative
comments (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
comments_enabledbooleanOptional
comments_urlstringOptional
commits_urlstringOptional
created_atstringOptional
descriptionJSONOptional
description (anyOf 1)stringAlternative
description (anyOf 2)nullAlternative
filesobjectOptionalAdditional keys: see wildcard field
files.*JSONAdditional keys
files.* (anyOf 1)objectAlternative
files.* (anyOf 1).contentstringOptional
files.* (anyOf 1).encodingstringOptionalThe encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported.
Default: utf-8
files.* (anyOf 1).filenamestringOptional
files.* (anyOf 1).languagestringOptional
files.* (anyOf 1).raw_urlstringOptional
files.* (anyOf 1).sizeJSONOptional
files.* (anyOf 1).size (anyOf 1)integerAlternative
files.* (anyOf 1).size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
files.* (anyOf 1).truncatedbooleanOptional
files.* (anyOf 1).typestringOptional
files.* (anyOf 2)nullAlternative
fork_ofJSONOptional
fork_of (anyOf 1)objectAlternativeGist
fork_of (anyOf 1).commentsJSONRequired within parent
fork_of (anyOf 1).comments (anyOf 1)integerAlternative
fork_of (anyOf 1).comments (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
fork_of (anyOf 1).comments_enabledbooleanOptional
fork_of (anyOf 1).comments_urlstringRequired within parentFormat: uri
fork_of (anyOf 1).commits_urlstringRequired within parentFormat: uri
fork_of (anyOf 1).created_atstringRequired within parentFormat: date-time
fork_of (anyOf 1).descriptionJSONRequired within parent
fork_of (anyOf 1).description (anyOf 1)stringAlternative
fork_of (anyOf 1).description (anyOf 2)nullAlternative
fork_of (anyOf 1).filesobjectRequired within parentAdditional keys: see wildcard field
fork_of (anyOf 1).files.*objectAdditional keys
fork_of (anyOf 1).files.*.filenamestringOptional
fork_of (anyOf 1).files.*.languagestringOptional
fork_of (anyOf 1).files.*.raw_urlstringOptional
fork_of (anyOf 1).files.*.sizeJSONOptional
fork_of (anyOf 1).files.*.size (anyOf 1)integerAlternative
fork_of (anyOf 1).files.*.size (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
fork_of (anyOf 1).files.*.typestringOptional
fork_of (anyOf 1).forksarrayOptional
fork_of (anyOf 1).forks[]JSONEach item
fork_of (anyOf 1).forks_urlstringRequired within parentFormat: uri
fork_of (anyOf 1).git_pull_urlstringRequired within parentFormat: uri
fork_of (anyOf 1).git_push_urlstringRequired within parentFormat: uri
fork_of (anyOf 1).historyarrayOptional
fork_of (anyOf 1).history[]JSONEach item
fork_of (anyOf 1).html_urlstringRequired within parentFormat: uri
fork_of (anyOf 1).idstringRequired within parent
fork_of (anyOf 1).node_idstringRequired within parent
fork_of (anyOf 1).ownerModelOptionalExpand Get an issue — response body — user
fork_of (anyOf 1).publicbooleanRequired within parent
fork_of (anyOf 1).truncatedbooleanOptional
fork_of (anyOf 1).updated_atstringRequired within parentFormat: date-time
fork_of (anyOf 1).urlstringRequired within parentFormat: uri
fork_of (anyOf 1).userModelRequired within parentExpand Get an issue — response body — user
fork_of (anyOf 2)nullAlternative
forks_urlstringOptional
git_pull_urlstringOptional
git_push_urlstringOptional
html_urlstringOptional
idstringOptional
node_idstringOptional
ownerModelOptionalExpand List users — response body — item
publicbooleanOptional
truncatedbooleanOptional
updated_atstringOptional
urlstringOptional
userJSONOptional
user (anyOf 1)stringAlternative
user (anyOf 2)nullAlternative

Referenced models: Get an issue — response body — user, List users — response body — item

List gist commits — response body — item

FieldTypePresenceDescription and constraints
$objectRootGist Commit
change_statusobjectRequired within parent
change_status.additionsJSONOptional
change_status.additions (anyOf 1)integerAlternative
change_status.additions (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
change_status.deletionsJSONOptional
change_status.deletions (anyOf 1)integerAlternative
change_status.deletions (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
change_status.totalJSONOptional
change_status.total (anyOf 1)integerAlternative
change_status.total (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
committed_atstringRequired within parentFormat: date-time
urlstringRequired within parentFormat: uri
userModelRequired within parentExpand Get an issue — response body — user
versionstringRequired within parent

Referenced models: Get an issue — response body — user

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.