Skip to content

Commit 3577ba2

Browse files
author
Marc-Andre Giroux
committed
v0.0.1
0 parents  commit 3577ba2

29 files changed

+2907187
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Schema Inaccuracy
3+
about: Reporting problems with the description
4+
title: "[Schema Inaccuracy] <Describe Problem>"
5+
labels: Inaccuracy
6+
assignees: ''
7+
8+
---
9+
10+
# Schema Inaccuracy
11+
12+
<!---
13+
Describe the problem shortly. Include the specific operation / schema that contains an error.
14+
-->
15+
16+
## Expected
17+
18+
<!---
19+
What was expected? For example: The `labels` property on the `Issue` schema should be of type `array` instead of `string`.
20+
--->
21+
22+
## Reproduction Steps
23+
24+
<!---
25+
Include steps to reproduce the problem with the description. For example:
26+
27+
$ curl -X POST https://api.github.com/issues
28+
--->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Thank you for contributing to [github/rest-api-description](https://github.com/github/rest-api-description)!
2+
3+
**Please note that we cannot accept pull requests that directly modify the descriptions in this repo.** If you have identified a problem with the descriptions, [consider opening an issue instead](https://github.com/github/rest-api-description/issues/new?template=schema-inaccuracy.md) :bow:

.github/workflows/release.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
on:
2+
push:
3+
# Sequence of patterns matched against refs/tags
4+
tags:
5+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6+
7+
name: Release and Upload Assets
8+
9+
jobs:
10+
build:
11+
name: Release and Upload Assets
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
- name: Build project # This would actually build your project, using zip for an example artifact
17+
run: |
18+
zip descriptions descriptions/**/*
19+
- name: Create Release
20+
id: create_release
21+
uses: actions/create-release@v1
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
tag_name: ${{ github.ref }}
26+
release_name: ${{ github.ref }}
27+
draft: false
28+
prerelease: false
29+
- name: Upload Release Asset
30+
id: upload-release-asset
31+
uses: actions/upload-release-asset@v1
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
36+
asset_path: ./descriptions.zip
37+
asset_name: descriptions.zip
38+
asset_content_type: application/zip

CODE_OF_CONDUCT.md

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Contributing
2+
3+
[fork]: https://github.com/github/REPO/fork
4+
[pr]: https://github.com/github/REPO/compare
5+
[style]: https://github.com/styleguide/ruby
6+
[code-of-conduct]: CODE_OF_CONDUCT.md
7+
8+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
9+
10+
Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE.md).
11+
12+
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
13+
14+
## Contributions to the OpenAPI descriptions
15+
16+
**We don't currently accept pull requests that directly modify the description artifacts found in this repository.** If you have feedback on the descriptions or have found a mismatch between the behavior that is described in this repo and the runtime behavior of the API, please [open an issue](https://github.com/github/rest-api-description/issues/new).
17+
18+
## Contributions to other files in the repository
19+
20+
We will gladly accept pull requests for contributions to other files in this repository.
21+
22+
### Submitting a pull request
23+
24+
0. [Fork][fork] and clone the repository
25+
0. Create a new branch: `git checkout -b my-branch-name`
26+
0. Make your change
27+
0. Push to your fork and [submit a pull request][pr]
28+
0. Pat your self on the back and wait for your pull request to be reviewed and merged.
29+
30+
## Resources
31+
32+
- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
33+
- [Using Pull Requests](https://help.github.com/articles/about-pull-requests/)
34+
- [GitHub Help](https://help.github.com)

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 GitHub
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# GitHub's REST API OpenAPI Description
2+
3+
This repository contains [OpenAPI](https://www.openapis.org/) descriptions for [GitHub's REST API](https://developer.github.com/v3/).
4+
5+
## What is OpenAPI?
6+
7+
From the [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification):
8+
9+
> The OpenAPI Specification (OAS) defines a standard, programming language-agnostic interface description for HTTP APIs, which allows both humans and computers to discover and understand the capabilities of a service without requiring access to source code, additional documentation, or inspection of network traffic. When properly defined via OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interface descriptions have done for lower-level programming, the OpenAPI Specification removes guesswork in calling a service.
10+
11+
## Project Status
12+
13+
This project is currently in **BETA**. We expect this description to be accurate but it is in **active development**. If you've identified a mismatch between GitHub API's behavior and these descriptions, [please open an issue.](https://github.com/github/rest-api-description/issues/new?template=schema-inaccuracy.md)
14+
15+
## Description Formats
16+
17+
Each OpenAPI document is available in two formats: **bundled** and **dereferenced**.
18+
19+
- The bundled descriptions are single file artifacts that make usages of OpenAPI **components** for reuse and portability. This is the prefered way of interacting with GitHub's OpenAPI description.
20+
- Certain tools have poor support for references to components within the artifact. We highly encourage to look into tooling that supports referenced components, but since that's not always posssible, we also provide a fully dereferenced version of the description as well, without any references.
21+
22+
## Vendor Extensions
23+
24+
We use various vendor extensions for concepts that are harder to express with OpenAPI components and/or are specific to GitHub. For more information on the extensions used in these description, check out [extensions.md](extensions.md)
25+
26+
## Limitations
27+
28+
- Not all headers are described in the OpenAPI documents, expect those to be added over time.
29+
- Certain GitHub API resources use multi segment path parameters, which aren't supported by the OpenAPI specification. For the time being, we have annotated such parameters with a `x-multi-segment` extension. In general, URL encoding those parameters is a good idea.
30+
- A lot of operations described in these documents are accessible through multiple paths. For the time being we have described the most common way to access these opereations, but are working on a way to describe alias paths and/or describe all possible paths.
31+
- This repository only contains the bundled and dereferenced versions of our REST API descriptions. We're looking into offering a fully **referenced** directory structure for easier browsing.
32+
33+
## Contributing
34+
35+
Because this description is used across GitHub's whole API development experience, we don't currently accept pull requests that directly modify the description. This repository is automatically kept up to date with the description used to validate GitHub API requests as well as powering contract tests. See [CONTRIBUTING.md](CONTRIBUTING.md) for more details.
36+
37+
## License
38+
39+
github/rest-api-description is licensed under the [MIT license](LICENSEE.md)
40+
41+
42+
## Contact
43+
44+
You may contact [[email protected]](mailto:[email protected]) with any questions related to this repository.

SECURITY.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
If you discover a security issue in this repo, please submit it through the [GitHub Security Bug Bounty](https://hackerone.com/github)
2+
3+
Thanks for helping make the GitHub REST API safe for everyone.

0 commit comments

Comments
 (0)