Skip to content

Commit b0ffc1f

Browse files
committed
Consolidate version info on new "Versions" page
- Create new "Versions" page - Move v3 "Deprecations" section to the new page - Move "Breaking Beta Changes" section to the new page - Move "Beta-to-v3 Changelog" section to the new page - Link to the new page from the "Current Version" section of the API overview page - Link to the new page from the "Media Type" page
1 parent 55af192 commit b0ffc1f

8 files changed

Lines changed: 147 additions & 124 deletions

File tree

content/changes/2013-04-25-deprecating-merge-commit-sha.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
attribute](/v3/pulls/#mergability) for improved understanding.
1717

1818
To protect future API consumers from this confusion, we have
19-
[deprecated](/v3/#deprecations) the `merge_commit_sha` attribute, and we will
19+
[deprecated](/v3/versions/#v3-deprecations) the `merge_commit_sha` attribute, and we will
2020
remove it in the next major version of the API.
2121

2222
As always, if you have any questions or feedback, please drop us a line at

content/v3.md

Lines changed: 3 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ This describes the resources that make up the official GitHub API v3. If you hav
1212

1313
## Current Version
1414

15-
Accept: application/vnd.github.beta+json
16-
17-
There are two versions of the GitHub API: `beta` and `v3`. (There are just a few [differences](/v3/media/#beta-to-v3-changelog) between these two versions.)
15+
There are [two versions](/v3/versions) of the GitHub API: **beta** and **v3**. By default, all requests receive the beta version:
1816

19-
By default, all requests receive the `beta` version. We encourage you to [request a specific version via the `Accept` header](/v3/media/#beta-v3-and-the-future).
17+
Accept: application/vnd.github.beta+json
2018

21-
The `beta` API and `v3` API are both unchangeable. Please [file a support issue][support] if you have problems.
19+
We encourage you to [request a specific version via the `Accept` header](#/v3/media/#beta-v3-and-the-future).
2220

2321
## Schema
2422

@@ -524,87 +522,4 @@ A link that looks like this:
524522
["url1", {:rel => "next"}],
525523
["url2", {:rel => "foo", :bar => "baz"}]] %>
526524

527-
## Deprecations
528-
529-
The following functionality is deprecated. For backwards compatibility purposes,
530-
API v3 will continue to provide this functionality. However, this deprecated
531-
functionality **will be removed** in the _next_ major version of the API.
532-
533-
The recommendations below will help you prepare your application for the next major version of the API.
534-
535-
1. Method: /gists/:id/fork
536-
: Recommendation: Use **/gists/:id/forks** (plural) instead.
537-
538-
1. Method: /legacy/issues/search/:owner/:repository/:state/:keyword
539-
: Recommendation: Use [v3 Issue Search API](/v3/search/#search-issues) instead.
540-
541-
1. Method: /legacy/repos/search/:keyword
542-
: Recommendation: Use [v3 Repository Search API](/v3/search/#search-repositories) instead.
543-
544-
1. Method: /legacy/user/search/:keyword
545-
: Recommendation: Use [v3 User Search API](/v3/search/#search-users) instead.
546-
547-
1. Method: /legacy/user/email/:email
548-
: Recommendation: Use [v3 User Search API](/v3/search/#search-users) instead.
549-
550-
1. Method: /repos/:owner/:repo/hooks/:id/test
551-
: Recommendation: Use **/repos/:owner/:repo/hooks/:id/tests** (plural) instead.
552-
553-
1. Query parameters when POSTing to /repos/:owner/:repo/forks
554-
: Recommendation: Use JSON to POST to this method instead.
555-
556-
1. Query parameter value: Passing "watchers" as the value for the "sort" parameter in a GET request to /repos/:owner/:repo/forks
557-
: Recommendation: Use **stargazers** as the value instead.
558-
559-
1. Pull Request attribute: merge_commit_sha
560-
: Recommendation: [Do not use this attribute](/changes/2013-04-25-deprecating-merge-commit-sha/).
561-
562-
1. Rate Limit attribute: rate
563-
: Recommendation: Use **resources["core"]** instead.
564-
565-
1. Repository attribute: forks
566-
: Recommendation: Use **fork_count** instead.
567-
568-
1. Repository attribute: master_branch
569-
: Recommendation: Use **default_branch** instead.
570-
571-
1. Repository attribute: open_issues
572-
: Recommendation: Use **open_issues_count** instead.
573-
574-
1. Repository attribute: public
575-
: Recommendation: When [creating a repository](/v3/repos/#create), use the
576-
**private** attribute to indicate whether the repository should be public or
577-
private. Do not use the **public** attribute.
578-
579-
1. Repository attribute: watchers
580-
: Recommendation: Use **watchers_count** instead.
581-
582-
1. User attribute: bio
583-
: Recommendation: Do not use this attribute. It is obsolete.
584-
585-
### Breaking Beta Changes
586-
587-
#### June 12, 2012:
588-
* Removed API v1 support
589-
* Removed API v2 support
590-
591-
#### June 15th, 2011:
592-
593-
* `gravatar_url` is being deprecated in favor of `avatar_url` for all
594-
responses that include users or orgs. A default size is no longer
595-
included in the URL.
596-
* Creating new gists (both anonymously and with an authenticated user)
597-
should use `POST /gists` from now on. `POST /users/:user/gists` is no
598-
longer supported.
599-
600-
#### June 1st, 2011:
601-
602-
* Removed support for PUT verb on update requests. Use POST or PATCH
603-
instead.
604-
* Removed `.json` extension from all URLs.
605-
* No longer using the X-Next or X-Last headers. Pagination info is
606-
returned in the Link header instead.
607-
* JSON-P response has completely changed to a more consistent format.
608-
* Starring gists now uses PUT verb (instead of POST) and returns 204.
609-
610525
[support]: https://github.com/contact?form[subject]=APIv3

content/v3/media.md

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The most basic media types the API supports are:
2121
application/json
2222
application/vnd.github+json
2323

24-
Neither of these specify a version, so you will always get the latest
24+
Neither of these specify a [version][versions], so you will always get the current default
2525
JSON representation of resources. If you're building an application and
2626
care about the stability of the API, specify a version like so:
2727

@@ -52,41 +52,16 @@ for the `X-GitHub-Media-Type` header:
5252

5353
## Beta, v3, and the Future
5454

55-
Ultimately, we aim for a version-less, [Hypermedia][hypermedia]-driven API.
56-
In the mean time, if you don't specify a version in the `Accept` header, you'll
57-
get the `beta` version (as shown above) by default.
55+
If you don't specify a version in the `Accept` header, you'll
56+
get the [beta version](/v3/versions#beta) (as shown above) by default.
5857

59-
Eventually, `v3` will become the default version. We recommend that you start
60-
using `v3` now. To get that version today, explicitly request the API v3
58+
Eventually, [v3](/v3/versions#v3) will become the default version. We recommend that you start
59+
using v3 now. To get that version today, explicitly request the API v3
6160
media type in the `Accept` header:
6261

6362
application/vnd.github.v3
6463

65-
Check out the [full list of differences](#beta-to-v3-changelog) between `beta` and `v3` below.
66-
67-
## Beta-to-v3 Changelog
68-
69-
The v3 media type differs from the beta media type in just a few places:
70-
71-
### Gist JSON
72-
73-
For [Gists](/v3/gists/#get-a-single-gist), the v3 media type renames the `user` attribute to `owner`.
74-
75-
### Issue JSON
76-
77-
When an [issue](/v3/issues/#get-a-single-issue) is not a pull request, the v3 media type omits the `pull_request` attribute.
78-
79-
### Repository JSON
80-
81-
For [Repositories](/v3/repos/#get), the v3 media type omits the `master_branch` attribute. API clients should use the `default_branch` attribute to obtain the repository's default branch.
82-
83-
### User JSON
84-
85-
For [Users](/v3/users/), the v3 media type omits the `public_gists` and `private_gists` attributes.
86-
87-
### User Emails JSON
88-
89-
For [User Emails](/v3/users/emails/#list-email-addresses-for-a-user), the v3 media type returns an array of hashes (instead of an array of strings).
64+
Check out [version docs][versions] for the [full list of differences](/v3/versions#differences-from-beta-version) between beta and v3.
9065

9166
## Comment Body Properties
9267

@@ -158,4 +133,4 @@ The Commit, Commit Comparison, and Pull Request resources support
158133
[git-diff]: http://git-scm.com/docs/git-diff
159134
[git-patch]: http://git-scm.com/docs/git-format-patch
160135
[hypermedia]: /v3/#hypermedia
161-
[expected-changes]: /v3/#deprecations
136+
[versions]: /v3/versions

content/v3/pulls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Each time the pull request receives new commits, GitHub creates a merge commit
6060
to _test_ whether the pull request can be automatically merged into the base
6161
branch. (This _test_ commit is not added to the base branch or the head branch.)
6262
The `merge_commit_sha` attribute holds the SHA of the _test_ merge commit;
63-
however, this attribute is [deprecated](/v3/#deprecations) and is scheduled for
63+
however, this attribute is [deprecated](/v3/versions/#v3-deprecations) and is scheduled for
6464
removal in the next version of the API. The Boolean `mergeable` attribute will
6565
remain to indicate whether the pull request can be automatically merged.
6666

content/v3/rate_limit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ all the _rest_ of the API.
4343
#### Deprecation Notice
4444

4545
The `"rate"` hash (shown at the bottom of the response above) is
46-
[deprecated](/v3/#deprecations) and is scheduled for removal in the next
46+
[deprecated](/v3/versions/#v3-deprecations) and is scheduled for removal in the next
4747
version of the API.
4848

4949
If you're writing new API client code (or updating your existing code), you

content/v3/search/legacy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ v3. There should be no changes, other than the new URL and JSON output format.
1414

1515
<div class="alert">
1616
<p>
17-
The Legacy Search API (described below) is <a href="https://github.com/v3/#deprecations">deprecated</a>
17+
The Legacy Search API (described below) is <a href="https://github.com/v3/versions/#v3-deprecations">deprecated</a>
1818
and is scheduled for removal in the next version of the API.
1919

2020
We recommend using the <a href="/v3/search/">v3 Search API</a> instead.

content/v3/versions.md

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
title: Versions | GitHub API
3+
---
4+
# Versions
5+
6+
There are two stable versions of the GitHub API: [beta](#beta) and [v3](#v3). There are just a few [differences between these two versions](#/v3/media/#beta-v3-and-the-future).
7+
8+
By default, all requests receive the beta version. We encourage you to [request a specific version via the `Accept` header](#/v3/media/#beta-v3-and-the-future).
9+
10+
# v3
11+
12+
The [v3 API](/v3) is stable and unchangeable. Please [file a support issue][support] if you have problems.
13+
14+
Some v3 functionality is [deprecated](#v3-deprecations) and will be removed in the next major version of the API.
15+
16+
## Differences from beta version
17+
18+
The v3 media type differs from the beta media type in just a few places:
19+
20+
### Gist JSON
21+
22+
For [Gists](/v3/gists/#get-a-single-gist), the v3 media type renames the `user` attribute to `owner`.
23+
24+
### Issue JSON
25+
26+
When an [issue](/v3/issues/#get-a-single-issue) is not a pull request, the v3 media type omits the `pull_request` attribute.
27+
28+
### Repository JSON
29+
30+
For [Repositories](/v3/repos/#get), the v3 media type omits the `master_branch` attribute. API clients should use the `default_branch` attribute to obtain the repository's default branch.
31+
32+
### User JSON
33+
34+
For [Users](/v3/users/), the v3 media type omits the `public_gists` and `private_gists` attributes.
35+
36+
### User Emails JSON
37+
38+
For [User Emails](/v3/users/emails/#list-email-addresses-for-a-user), the v3 media type returns an array of hashes (instead of an array of strings).
39+
40+
## v3 deprecations
41+
42+
The following functionality is deprecated. For backwards compatibility purposes,
43+
v3 will continue to provide this functionality. However, this deprecated
44+
functionality _will be removed_ in the next major version of the API.
45+
46+
The recommendations below will help you prepare your application for the next major version of the API.
47+
48+
1. Method: /gists/:id/fork
49+
: Recommendation: Use **/gists/:id/forks** (plural) instead.
50+
51+
1. Method: /legacy/issues/search/:owner/:repository/:state/:keyword
52+
: Recommendation: Use [v3 Issue Search API](/v3/search/#search-issues) instead.
53+
54+
1. Method: /legacy/repos/search/:keyword
55+
: Recommendation: Use [v3 Repository Search API](/v3/search/#search-repositories) instead.
56+
57+
1. Method: /legacy/user/search/:keyword
58+
: Recommendation: Use [v3 User Search API](/v3/search/#search-users) instead.
59+
60+
1. Method: /legacy/user/email/:email
61+
: Recommendation: Use [v3 User Search API](/v3/search/#search-users) instead.
62+
63+
1. Method: /repos/:owner/:repo/hooks/:id/test
64+
: Recommendation: Use **/repos/:owner/:repo/hooks/:id/tests** (plural) instead.
65+
66+
1. Query parameters when POSTing to /repos/:owner/:repo/forks
67+
: Recommendation: Use JSON to POST to this method instead.
68+
69+
1. Query parameter value: Passing "watchers" as the value for the "sort" parameter in a GET request to /repos/:owner/:repo/forks
70+
: Recommendation: Use **stargazers** as the value instead.
71+
72+
1. Pull Request attribute: merge_commit_sha
73+
: Recommendation: [Do not use this attribute](/changes/2013-04-25-deprecating-merge-commit-sha/).
74+
75+
1. Rate Limit attribute: rate
76+
: Recommendation: Use **resources["core"]** instead.
77+
78+
1. Repository attribute: forks
79+
: Recommendation: Use **fork_count** instead.
80+
81+
1. Repository attribute: master_branch
82+
: Recommendation: Use **default_branch** instead.
83+
84+
1. Repository attribute: open_issues
85+
: Recommendation: Use **open_issues_count** instead.
86+
87+
1. Repository attribute: public
88+
: Recommendation: When [creating a repository](/v3/repos/#create), use the
89+
**private** attribute to indicate whether the repository should be public or
90+
private. Do not use the **public** attribute.
91+
92+
1. Repository attribute: watchers
93+
: Recommendation: Use **watchers_count** instead.
94+
95+
1. User attribute: bio
96+
: Recommendation: Do not use this attribute. It is obsolete.
97+
98+
99+
# beta
100+
101+
The [beta API](/v3) is now stable and unchangeable. Please [file a support issue][support] if you have problems.
102+
103+
## Breaking beta changes
104+
105+
### June 15th, 2011:
106+
107+
* `gravatar_url` is being deprecated in favor of `avatar_url` for all
108+
responses that include users or orgs. A default size is no longer
109+
included in the URL.
110+
* Creating new gists (both anonymously and with an authenticated user)
111+
should use `POST /gists` from now on. `POST /users/:user/gists` is no
112+
longer supported.
113+
114+
### June 1st, 2011:
115+
116+
* Removed support for PUT verb on update requests. Use POST or PATCH
117+
instead.
118+
* Removed `.json` extension from all URLs.
119+
* No longer using the X-Next or X-Last headers. Pagination info is
120+
returned in the Link header instead.
121+
* JSON-P response has completely changed to a more consistent format.
122+
* Starring gists now uses PUT verb (instead of POST) and returns 204.
123+
124+
# v2
125+
126+
We removed support for API v2 on June 12, 2012.
127+
128+
# v1
129+
130+
We removed support for API v1 on June 12, 2012.
131+
132+
[support]: https://github.com/contact?form[subject]=APIv3

layouts/sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ <h3><a href="#" class="js-expand-btn collapsed arrow-btn"></a><a href="/v3/">Ove
88
<li><a href="/v3/oauth/">OAuth</a></li>
99
<li><a href="/v3/auth/">Other Authentication Methods</a></li>
1010
<li><a href="/v3/troubleshooting/">Troubleshooting</a></li>
11+
<li><a href="/v3/versions/">Versions</a></li>
1112
</ul>
1213
</li>
1314
<li class="js-topic">

0 commit comments

Comments
 (0)