Skip to content

Commit 134a7b9

Browse files
Update OpenAPI Descriptions (#17749)
* Update OpenAPI Descriptions * Add decorated OpenAPI schema files
1 parent 6e072b6 commit 134a7b9

16 files changed

Lines changed: 261 additions & 28 deletions

lib/rest/static/decorated/api.github.com.json

Lines changed: 77 additions & 2 deletions
Large diffs are not rendered by default.

lib/rest/static/decorated/ghes-2.18.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/rest/static/decorated/ghes-2.19.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/rest/static/decorated/ghes-2.20.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/rest/static/decorated/ghes-2.21.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/rest/static/decorated/ghes-2.22.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/rest/static/decorated/ghes-3.0.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/rest/static/decorated/github.ae.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

lib/rest/static/dereferenced/api.github.com.deref.json

Lines changed: 135 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99688,6 +99688,14 @@
9968899688
"format": "uri",
9968999689
"example": "https://api.github.com/repos/github/docs/community/code_of_conduct"
9969099690
},
99691+
"key": {
99692+
"type": "string",
99693+
"example": "citizen_code_of_conduct"
99694+
},
99695+
"name": {
99696+
"type": "string",
99697+
"example": "Citizen Code of Conduct"
99698+
},
9969199699
"html_url": {
9969299700
"type": "string",
9969399701
"nullable": true,
@@ -99697,6 +99705,8 @@
9969799705
},
9969899706
"required": [
9969999707
"url",
99708+
"key",
99709+
"name",
9970099710
"html_url"
9970199711
]
9970299712
}
@@ -100791,6 +100801,8 @@
100791100801
"watchers": 1
100792100802
},
100793100803
"code_of_conduct": {
100804+
"key": "other",
100805+
"name": "Other",
100794100806
"html_url": "https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md",
100795100807
"url": "https://api.github.com/repos/github/docs/community/code_of_conduct"
100796100808
}
@@ -104557,6 +104569,14 @@
104557104569
"format": "uri",
104558104570
"example": "https://api.github.com/repos/github/docs/community/code_of_conduct"
104559104571
},
104572+
"key": {
104573+
"type": "string",
104574+
"example": "citizen_code_of_conduct"
104575+
},
104576+
"name": {
104577+
"type": "string",
104578+
"example": "Citizen Code of Conduct"
104579+
},
104560104580
"html_url": {
104561104581
"type": "string",
104562104582
"nullable": true,
@@ -104566,6 +104586,8 @@
104566104586
},
104567104587
"required": [
104568104588
"url",
104589+
"key",
104590+
"name",
104569104591
"html_url"
104570104592
]
104571104593
}
@@ -162935,6 +162957,106 @@
162935162957
}
162936162958
}
162937162959
},
162960+
"/repos/{owner}/{repo}/community/code_of_conduct": {
162961+
"get": {
162962+
"summary": "Get the code of conduct for a repository",
162963+
"description": "Returns the contents of the repository's code of conduct file, if one is detected.\n\nA code of conduct is detected if there is a file named `CODE_OF_CONDUCT` in the root directory of the repository. GitHub detects which code of conduct it is using fuzzy matching.",
162964+
"tags": [
162965+
"codes-of-conduct"
162966+
],
162967+
"operationId": "codes-of-conduct/get-for-repo",
162968+
"externalDocs": {
162969+
"description": "API method documentation",
162970+
"url": "https://docs.github.com/v3/codes_of_conduct/#get-the-code-of-conduct-for-a-repository"
162971+
},
162972+
"parameters": [
162973+
{
162974+
"name": "owner",
162975+
"in": "path",
162976+
"required": true,
162977+
"schema": {
162978+
"type": "string"
162979+
}
162980+
},
162981+
{
162982+
"name": "repo",
162983+
"in": "path",
162984+
"required": true,
162985+
"schema": {
162986+
"type": "string"
162987+
}
162988+
}
162989+
],
162990+
"responses": {
162991+
"200": {
162992+
"description": "response",
162993+
"content": {
162994+
"application/json": {
162995+
"schema": {
162996+
"title": "Code Of Conduct",
162997+
"description": "Code Of Conduct",
162998+
"type": "object",
162999+
"properties": {
163000+
"key": {
163001+
"type": "string",
163002+
"example": "contributor_covenant"
163003+
},
163004+
"name": {
163005+
"type": "string",
163006+
"example": "Contributor Covenant"
163007+
},
163008+
"url": {
163009+
"type": "string",
163010+
"format": "uri",
163011+
"example": "https://api.github.com/codes_of_conduct/contributor_covenant"
163012+
},
163013+
"body": {
163014+
"type": "string",
163015+
"example": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\n to any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\n posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [EMAIL]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n"
163016+
},
163017+
"html_url": {
163018+
"type": "string",
163019+
"format": "uri",
163020+
"nullable": true
163021+
}
163022+
},
163023+
"required": [
163024+
"url",
163025+
"html_url",
163026+
"key",
163027+
"name"
163028+
]
163029+
},
163030+
"examples": {
163031+
"default": {
163032+
"value": {
163033+
"key": "contributor_covenant",
163034+
"name": "Contributor Covenant",
163035+
"url": "https://github.com/LindseyB/cosee/blob/master/CODE_OF_CONDUCT.md",
163036+
"body": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.\n\n## Our Standards\n\nExamples of behavior that contributes to creating a positive environment include:\n\n* Using welcoming and inclusive language\n* Being respectful of differing viewpoints and experiences\n* Gracefully accepting constructive criticism\n* Focusing on what is best for the community\n* Showing empathy towards other community members\n\nExamples of unacceptable behavior by participants include:\n\n* The use of sexualized language or imagery and unwelcome sexual attention or advances\n* Trolling, insulting/derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or electronic address, without explicit permission\n* Other conduct which could reasonably be considered inappropriate in a professional setting\n\n## Our Responsibilities\n\nProject maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response\nto any instances of unacceptable behavior.\n\nProject maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.\n\n## Scope\n\nThis Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address,\nposting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at lindseyb@github.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.\n\nProject maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]\n\n[homepage]: http://contributor-covenant.org\n[version]: http://contributor-covenant.org/version/1/4/\n",
163037+
"html_url": "https://github.com/LindseyB/cosee/blob/master/CODE_OF_CONDUCT.md"
163038+
}
163039+
}
163040+
}
163041+
}
163042+
}
163043+
}
163044+
},
163045+
"x-github": {
163046+
"githubCloudOnly": false,
163047+
"enabledForGitHubApps": true,
163048+
"previews": [
163049+
{
163050+
"required": true,
163051+
"name": "scarlet-witch",
163052+
"note": "The Codes of Conduct API is currently available for developers to preview.\n\nTo access the API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.scarlet-witch-preview+json\n```"
163053+
}
163054+
],
163055+
"category": "codes-of-conduct",
163056+
"subcategory": null
163057+
}
163058+
}
163059+
},
162938163060
"/repos/{owner}/{repo}/community/profile": {
162939163061
"get": {
162940163062
"summary": "Get community profile metrics",
@@ -163005,6 +163127,14 @@
163005163127
"format": "uri",
163006163128
"example": "https://api.github.com/repos/github/docs/community/code_of_conduct"
163007163129
},
163130+
"key": {
163131+
"type": "string",
163132+
"example": "citizen_code_of_conduct"
163133+
},
163134+
"name": {
163135+
"type": "string",
163136+
"example": "Citizen Code of Conduct"
163137+
},
163008163138
"html_url": {
163009163139
"type": "string",
163010163140
"nullable": true,
@@ -163014,6 +163144,8 @@
163014163144
},
163015163145
"required": [
163016163146
"url",
163147+
"key",
163148+
"name",
163017163149
"html_url"
163018163150
]
163019163151
}
@@ -163194,7 +163326,9 @@
163194163326
"documentation": null,
163195163327
"files": {
163196163328
"code_of_conduct": {
163197-
"url": "https://api.github.com/repos/octocat/Hello-World/contents/CODE_OF_CONDUCT.md",
163329+
"name": "Contributor Covenant",
163330+
"key": "contributor_covenant",
163331+
"url": "https://api.github.com/codes_of_conduct/contributor_covenant",
163198163332
"html_url": "https://github.com/octocat/Hello-World/blob/master/CODE_OF_CONDUCT.md"
163199163333
},
163200163334
"contributing": {

lib/rest/static/dereferenced/ghes-2.18.deref.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63926,10 +63926,10 @@
6392663926
"anonymous_access_enabled": false
6392763927
},
6392863928
"code_of_conduct": {
63929-
"html_url": "https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md",
63930-
"url": "https://api.github.com/repos/github/docs/community/code_of_conduct",
6393163929
"key": "other",
63932-
"name": "Other"
63930+
"name": "Other",
63931+
"html_url": "https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md",
63932+
"url": "https://api.github.com/repos/github/docs/community/code_of_conduct"
6393363933
},
6393463934
"anonymous_access_enabled": false
6393563935
}

0 commit comments

Comments
 (0)