Skip to content

Commit 304eecf

Browse files
committed
Bug 1505402 - servicesManifest -> apiManifest
1 parent 601b3c2 commit 304eecf

File tree

12 files changed

+173
-23
lines changed

12 files changed

+173
-23
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ root URL:
3333
* `exchangeReference(rootUrl, service, version)` -> `String`
3434
* `schema(rootUrl, service, schema)` -> `String`
3535
* `ui(rootUrl, path)` -> `String`
36-
* `servicesManifest(rootUrl)` -> `String`
36+
* `apiManifest(rootUrl)` -> `String`
3737
* `testRootUrl()` -> `String`
3838
* `withRootUrl(rootUrl)` -> `Class` instance for above methods
3939

@@ -52,7 +52,7 @@ libUrls.schema(rootUrl, 'auth', 'v1/foo.yml'); // Note that schema names have ve
5252
libUrls.apiReference(rootUrl, 'auth', 'v1');
5353
libUrls.exchangeReference(rootUrl, 'auth', 'v1');
5454
libUrls.ui(rootUrl, 'foo/bar');
55-
libUrls.servicesManifest(rootUrl);
55+
libUrls.apiManifest(rootUrl);
5656
libUrls.docs(rootUrl, 'foo/bar');
5757
```
5858

@@ -67,7 +67,7 @@ urls.schema('auth', 'v1/foo.yml');
6767
urls.apiReference('auth', 'v1');
6868
urls.exchangeReference('auth', 'v1');
6969
urls.ui('foo/bar');
70-
urls.servicesManifest();
70+
urls.apiManifest();
7171
urls.docs('foo/bar');
7272
```
7373

@@ -104,7 +104,7 @@ func Docs(rootURL string, path string) string
104104
func ExchangeReference(rootURL string, service string, version string) string
105105
func Schema(rootURL string, service string, name string) string
106106
func UI(rootURL string, path string) string
107-
func ServicesManifest(rootURL string) string
107+
func APIManifest(rootURL string) string
108108
```
109109

110110
Install with:
@@ -132,7 +132,7 @@ taskcluster_urls.schema(root_url, 'auth', 'v1/foo.yml') # Note that schema names
132132
taskcluster_urls.api_reference(root_url, 'auth', 'v1')
133133
taskcluster_urls.exchange_reference(root_url, 'auth', 'v1')
134134
taskcluster_urls.ui(root_url, 'foo/bar')
135-
taskcluster_urls.servicesManifest(root_url)
135+
taskcluster_urls.apiManifest(root_url)
136136
taskcluster_urls.docs(root_url, 'foo/bar')
137137

138138
And for testing,
@@ -186,7 +186,7 @@ import org.mozilla.taskcluster.urls.*;
186186
String authAPIRef = urlProvider.apiReference("auth", "v1");
187187
String authExchangesRef = urlProvider.exchangeReference("auth", "v1");
188188
String uiFooBar = urlProvider.ui("foo/bar");
189-
String servicesManifest = urlProvider.servicesManifest();
189+
String apiManifest = urlProvider.apiManifest();
190190
String docsFooBar = urlProvider.docs("foo/bar");
191191

192192
...

docs/urls-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Taskcluster uses URLs with the following pattern:
2525
| exchangeReference(rootUrl, service, version) | `<rootUrl>/references/<service>/<version>/exchanges.json` |
2626
| schema(rootUrl, service, schema) | `<rootUrl>/schemas/<service>/<schema>` |
2727
| ui(rootUrl, path) | `<rootUrl>/<path>` |
28-
| servicesManifest(rootUrl) | `<rootUrl>/references/manifest.json` |
28+
| apiManifest(rootUrl) | `<rootUrl>/references/manifest.json` |
2929

3030
*NOTE*: you should *always* use this library to generate URLs, rather than
3131
hard-coding any of the above patterns.

src/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class LegacyUrls {
5454
/**
5555
* Returns a URL for the service manifest of a taskcluster deployment.
5656
*/
57-
servicesManifest() {
57+
apiManifest() {
5858
return 'https://references.taskcluster.net/manifest.json';
5959
}
6060
}
@@ -110,7 +110,7 @@ class Urls {
110110
/**
111111
* Returns a URL for the service manifest of a taskcluster deployment.
112112
*/
113-
servicesManifest() {
113+
apiManifest() {
114114
return `${this.rootUrl}/references/manifest.json`;
115115
}
116116
}
@@ -195,8 +195,8 @@ module.exports = {
195195
/**
196196
* Returns a URL for the service manifest of a taskcluster deployment.
197197
*/
198-
servicesManifest(rootUrl) {
199-
return withRootUrl(rootUrl).servicesManifest();
198+
apiManifest(rootUrl) {
199+
return withRootUrl(rootUrl).apiManifest();
200200
},
201201

202202
/**

src/main/java/org/mozilla/taskcluster/urls/LegacyURLs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public String ui(String path) {
5151
/**
5252
* Returns a URL for the service manifest of a taskcluster deployment.
5353
*/
54-
public String servicesManifest() {
54+
public String apiManifest() {
5555
return "https://references.taskcluster.net/manifest.json";
5656
}
5757
}

src/main/java/org/mozilla/taskcluster/urls/NewURLs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public String ui(String path) {
5757
/**
5858
* Returns a URL for the service manifest of a taskcluster deployment.
5959
*/
60-
public String servicesManifest() {
60+
public String apiManifest() {
6161
return this.rootURL + "/references/manifest.json";
6262
}
6363
}

src/main/java/org/mozilla/taskcluster/urls/URLProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ public interface URLProvider {
4343
/**
4444
* Returns a URL for the service manifest of a taskcluster deployment.
4545
*/
46-
public String servicesManifest();
46+
public String apiManifest();
4747
}

src/test/java/org/mozilla/taskcluster/urls/URLsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ public static String testFunc(String function, URLProvider urlProvider, String[]
6262
return urlProvider.schema(args[0], args[1]);
6363
case "ui":
6464
return urlProvider.ui(args[0]);
65-
case "servicesManifest":
66-
return urlProvider.servicesManifest();
65+
case "apiManifest":
66+
return urlProvider.apiManifest();
6767
default:
6868
throw new NoSuchMethodException("Unknown function type: " + function);
6969
}

taskcluster_urls/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ def ui(root_url, path):
6060
else:
6161
return '{}/{}'.format(root_url, path)
6262

63-
def services_manifest(root_url):
64-
"""Returns a URL for the service manifest of a taskcluster deployment."""
63+
def api_manifest(root_url):
64+
"""Returns a URL for the API manifest of a taskcluster deployment."""
6565
root_url = root_url.rstrip('/')
6666
if root_url == OLD_ROOT_URL:
6767
return 'https://references.taskcluster.net/manifest.json'

tcurls.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ func UI(rootURL string, path string) string {
7777
}
7878
}
7979

80-
// ServicesManifest returns a URL for the service manifest of a taskcluster deployment
81-
func ServicesManifest(rootURL string) string {
80+
// APIManifest returns a URL for the service manifest of a taskcluster deployment
81+
func APIManifest(rootURL string) string {
8282
switch r := strings.TrimRight(rootURL, "/"); r {
8383
case oldRootURL:
8484
return "https://references.taskcluster.net/manifest.json"

tcurls_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ func testFunc(t *testing.T, function string, expectedURL string, root string, ar
3434
actualURL = Schema(root, args[0], args[1])
3535
case "ui":
3636
actualURL = UI(root, args[0])
37-
case "servicesManifest":
38-
actualURL = ServicesManifest(root)
37+
case "apiManifest":
38+
actualURL = APIManifest(root)
3939
default:
4040
t.Errorf("Unknown function type: %s", function)
4141
return

0 commit comments

Comments
 (0)