Merge pull request #153 from stevvooe/move-spec-api
doc/spec: move API specification into correct position
This commit is contained in:
commit
cc91aeab00
5 changed files with 23 additions and 16 deletions
1
AUTHORS
1
AUTHORS
|
@ -3,6 +3,7 @@ Andrey Kostov <kostov.andrey@gmail.com>
|
||||||
Anton Tiurin <noxiouz@yandex.ru>
|
Anton Tiurin <noxiouz@yandex.ru>
|
||||||
Arnaud Porterie <arnaud.porterie@docker.com>
|
Arnaud Porterie <arnaud.porterie@docker.com>
|
||||||
Brian Bland <brian.bland@docker.com>
|
Brian Bland <brian.bland@docker.com>
|
||||||
|
Derek McGowan <derek@mcgstyle.net>
|
||||||
Josh Hawn <josh.hawn@docker.com>
|
Josh Hawn <josh.hawn@docker.com>
|
||||||
Olivier Gambier <olivier@docker.com>
|
Olivier Gambier <olivier@docker.com>
|
||||||
Stephen J Day <stephen.day@docker.com>
|
Stephen J Day <stephen.day@docker.com>
|
||||||
|
|
12
Makefile
12
Makefile
|
@ -6,10 +6,10 @@ GO_LDFLAGS=-ldflags "-X `go list ./version`.Version `git describe --match 'v[0-9
|
||||||
|
|
||||||
.PHONY: clean all fmt vet lint build test binaries
|
.PHONY: clean all fmt vet lint build test binaries
|
||||||
.DEFAULT: default
|
.DEFAULT: default
|
||||||
all: clean fmt vet fmt lint build test binaries
|
all: AUTHORS clean fmt vet fmt lint build test binaries
|
||||||
|
|
||||||
AUTHORS: .mailmap .git/ORIG_HEAD .git/FETCH_HEAD .git/HEAD
|
AUTHORS: .mailmap .git/ORIG_HEAD .git/FETCH_HEAD .git/HEAD
|
||||||
git log --format='%aN <%aE>' | sort -fu >> $@
|
git log --format='%aN <%aE>' | sort -fu > $@
|
||||||
|
|
||||||
# This only needs to be generated by hand when cutting full releases.
|
# This only needs to be generated by hand when cutting full releases.
|
||||||
version/version.go:
|
version/version.go:
|
||||||
|
@ -18,6 +18,12 @@ version/version.go:
|
||||||
${PREFIX}/bin/registry: version/version.go $(shell find . -type f -name '*.go')
|
${PREFIX}/bin/registry: version/version.go $(shell find . -type f -name '*.go')
|
||||||
go build -o $@ ${GO_LDFLAGS} ./cmd/registry
|
go build -o $@ ${GO_LDFLAGS} ./cmd/registry
|
||||||
|
|
||||||
|
${PREFIX}/bin/registry-api-descriptor-template: version/version.go $(shell find . -type f -name '*.go')
|
||||||
|
go build -o $@ ${GO_LDFLAGS} ./cmd/registry-api-descriptor-template
|
||||||
|
|
||||||
|
doc/spec/api.md: doc/spec/api.md.tmpl ${PREFIX}/bin/registry-api-descriptor-template
|
||||||
|
./bin/registry-api-descriptor-template $< > $@
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
go vet ./...
|
go vet ./...
|
||||||
|
|
||||||
|
@ -37,7 +43,7 @@ test:
|
||||||
test-full:
|
test-full:
|
||||||
go test ./...
|
go test ./...
|
||||||
|
|
||||||
binaries: ${PREFIX}/bin/registry
|
binaries: ${PREFIX}/bin/registry ${PREFIX}/bin/registry-api-descriptor-template
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf "${PREFIX}/bin/registry"
|
rm -rf "${PREFIX}/bin/registry"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// For example, to generate a new API specification, one would execute the
|
// For example, to generate a new API specification, one would execute the
|
||||||
// following command from the repo root:
|
// following command from the repo root:
|
||||||
//
|
//
|
||||||
// $ registry-api-descriptor-template doc/SPEC.md.tmpl > doc/SPEC.md
|
// $ registry-api-descriptor-template doc/spec/api.md.tmpl > doc/spec/api.md
|
||||||
//
|
//
|
||||||
// The templates are passed in the api/v2.APIDescriptor object. Please see the
|
// The templates are passed in the api/v2.APIDescriptor object. Please see the
|
||||||
// package documentation for fields available on that object. The template
|
// package documentation for fields available on that object. The template
|
||||||
|
|
|
@ -693,7 +693,7 @@ The error codes encountered via the API are enumerated in the following table:
|
||||||
`UNAUTHORIZED` | access to the requested resource is not authorized | The access controller denied access for the operation on a resource. Often this will be accompanied by a 401 Unauthorized response status.
|
`UNAUTHORIZED` | access to the requested resource is not authorized | The access controller denied access for the operation on a resource. Often this will be accompanied by a 401 Unauthorized response status.
|
||||||
`DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest.
|
`DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest.
|
||||||
`SIZE_INVALID` | provided length did not match content length | When a layer is uploaded, the provided size will be checked against the uploaded content. If they do not match, this error will be returned.
|
`SIZE_INVALID` | provided length did not match content length | When a layer is uploaded, the provided size will be checked against the uploaded content. If they do not match, this error will be returned.
|
||||||
`NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned.
|
`NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation.
|
||||||
`TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned.
|
`TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned.
|
||||||
`NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry.
|
`NAME_UNKNOWN` | repository name not known to registry | This is returned if the name used during an operation is unknown to the registry.
|
||||||
`MANIFEST_UNKNOWN` | manifest unknown | This error is returned when the manifest, identified by name and tag is unknown to the repository.
|
`MANIFEST_UNKNOWN` | manifest unknown | This error is returned when the manifest, identified by name and tag is unknown to the repository.
|
||||||
|
@ -1004,7 +1004,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
|
| `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -1159,7 +1159,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
|
| `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
|
||||||
| `MANIFEST_INVALID` | manifest invalid | During upload, manifests undergo several checks ensuring validity. If those checks fail, this error may be returned, unless a more specific error is included. The detail will contain information the failed validation. |
|
| `MANIFEST_INVALID` | manifest invalid | During upload, manifests undergo several checks ensuring validity. If those checks fail, this error may be returned, unless a more specific error is included. The detail will contain information the failed validation. |
|
||||||
| `MANIFEST_UNVERIFIED` | manifest failed signature verification | During manifest upload, if the manifest fails signature verification, this error will be returned. |
|
| `MANIFEST_UNVERIFIED` | manifest failed signature verification | During manifest upload, if the manifest fails signature verification, this error will be returned. |
|
||||||
|
@ -1333,7 +1333,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
|
| `TAG_INVALID` | manifest tag did not match URI | During a manifest upload, if the tag in the manifest does not match the uri tag, this error will be returned. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -1506,7 +1506,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -1655,7 +1655,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -1816,7 +1816,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1920,7 +1920,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2045,7 +2045,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
|
| `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -2203,7 +2203,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
|
| `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -2372,7 +2372,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
| `DIGEST_INVALID` | provided digest did not match uploaded content | When a blob is uploaded, the registry will check that the content matches the digest provided by the client. The error may include a detail structure with the key "digest", including the invalid digest string. This error may also be returned when a manifest includes an invalid layer digest. |
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
|
| `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
|
||||||
|
|
||||||
|
|
||||||
|
@ -2539,7 +2539,7 @@ The error codes that may be included in the response body are enumerated below:
|
||||||
|
|
||||||
|Code|Message|Description|
|
|Code|Message|Description|
|
||||||
-------|----|------|------------
|
-------|----|------|------------
|
||||||
| `NAME_INVALID` | manifest name did not match URI | During a manifest upload, if the name in the manifest does not match the uri name, this error will be returned. |
|
| `NAME_INVALID` | invalid repository name | Invalid repository name encountered either during manifest validation or any API operation. |
|
||||||
| `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
|
| `BLOB_UPLOAD_INVALID` | blob upload invalid | The blob upload encountered an error and can no longer proceed. |
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue