Closed Bug 1508846 Opened 6 years ago Closed 6 years ago

Generate references with an abstract $schema

Categories

(Taskcluster :: Services, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dustin)

References

Details

tc-lib-api and tc-lib-pulse both produce references with https://schemas.taskcluster.net values in $schema. These should be "abstract", and moreover should point to the new copies of these schemas at `/common/v1/{api,exchanges}-reference-v1.json#`. While I'm there, let's make ApiBuilder take `apiVersion` instead of `version` and stop producing references that contain a baseUrl or version.
Well, that was wrong three ways.. /schemas/common/{api,exchanges}-reference-v0.json#
Commits pushed to master at https://github.com/taskcluster/taskcluster-lib-api https://github.com/taskcluster/taskcluster-lib-api/commit/a0c04883270ef6d3808f0fe3d686c527806890b4 Bug 1508846 - generate abstract $schema (and stop validating) With the advent of tc-lib-references, reference validation is a little more complicated than can be handled in tc-lib-api, so let's stop doing that. https://github.com/taskcluster/taskcluster-lib-api/commit/c12c3409e38a8260a15b0527dd3491840564e251 Bug 1508846 - rename option version to apiVersion https://github.com/taskcluster/taskcluster-lib-api/commit/c418f6ec4cfe6abe3ec28759fa68357944799b3c Bug 1508846 - drop the old baseUrl and version fields from references https://github.com/taskcluster/taskcluster-lib-api/commit/96ad9da20cb4c3c99e76089d001b7c0abf4bafe5 Merge pull request #143 from djmitche/bug1508846 Bug 1508846 - generate new-format references
The legacy stuff looks OK (some relative paths, some absolute..): http://references.taskcluster.net/purge-cache/v1/api.json http://schemas.taskcluster.net/purge-cache/v1/purge-cache-request.json The output as part of the tc-builder process looks right to me: dustin@lamport /dev/shm/tcbuild/docs $ cat purge-cache/schemas/v1/purge-cache-request.json { "$schema": "http://json-schema.org/draft-06/schema#", "title": "Purge Cache Request", "description": "Request that a message be published to purge a specific cache.\n", "type": "object", "properties": { "cacheName": { "type": "string", "description": "Name of cache to purge. Notice that if a `workerType` have multiple kinds\nof caches (with independent names), it should purge all caches identified\nby `cacheName` regardless of cache type.\n" } }, "additionalProperties": false, "required": [ "cacheName" ], "$id": "/schemas/purge-cache/v1/purge-cache-request.json#" } dustin@lamport /dev/shm/tcbuild/docs $ cat purge-cache/references/api.json { "$schema": "/schemas/common/api-reference-v0.json#", "title": "Purge Cache API", "description": "The purge-cache service, typically available at\n`purge-cache.taskcluster.net`, is responsible for publishing a pulse\nmessage for workers, so they can purge cache upon request.\n\nThis document describes the API end-point for publishing the pulse\nmessage. This is mainly intended to be used by tools.", "serviceName": "purge-cache", "apiVersion": "v1", "entries": [...] }
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Component: Redeployability → Services
You need to log in before you can comment on or make changes to this bug.