mirror of
https://github.com/Effect-TS/effect.git
synced 2026-11-22 03:25:35 +08:00
- generate the schemas from moby's api/docs/v1.52.yaml, and drop the pre-1.52 /system/df patch - send every request at /v1.52 after one unversioned /version check that the Engine serves it; UnsupportedApiVersion reports the Engine's range and asks to upgrade an old Engine - remove negotiation, the apiVersion setting, ApiVersions gates and OptionNotSupported - accept DOCKER_API_VERSION only as 1.52 - remove post-1.52 surface: image attestations, the images identity query, keep-storage; events as x-ndjson - DockerConfig hashes context names with effect/crypto's Digest, after main replaced effect/Crypto - docs, codegen notes and the changeset state the fixed support policy
57 lines
4.0 KiB
YAML
57 lines
4.0 KiB
YAML
# The Docker Engine API document that `effect/docker/DockerSchema` is generated from: moby's
|
|
# snapshot of API 1.52, the one API version the client speaks.
|
|
#
|
|
# Changing the API version is a compatibility decision, not a routine update: it changes which
|
|
# Engines the client works with. To make it, point `spec` at that version's `api/docs/v1.xx.yaml`,
|
|
# update `apiVersion` and `DockerConfig`'s API version, regenerate from the repository root,
|
|
# review the diff, and declare what packages/effect/test/docker/DockerApi.test.ts reports:
|
|
# node packages/tools/docker-codegen/src/bin.ts
|
|
spec: https://raw.githubusercontent.com/moby/moby/475c34abbab8e8b7ad45887b46a7bac89b2cea7c/api/docs/v1.52.yaml
|
|
apiVersion: "1.52"
|
|
output: ../../effect/src/docker/DockerSchema.ts
|
|
# the operations, which test/docker/DockerApi.test.ts checks DockerApi against
|
|
manifest: ../../effect/test/docker/fixtures/engine-api.json
|
|
# the `@since` of the generated definitions
|
|
since: "4.2.0"
|
|
header: |
|
|
/**
|
|
* Schemas for the Docker Engine API, generated from moby's API document
|
|
* (`api/docs/v1.52.yaml`, API version 1.52).
|
|
*
|
|
* Do not edit this file by hand: change `packages/tools/docker-codegen` and
|
|
* regenerate it.
|
|
*
|
|
* Request bodies and responses use the Engine's own PascalCase field names, so
|
|
* the Engine API reference maps 1:1. Decoding is lenient where Engines differ:
|
|
* enums accept unknown values, integers decode as plain numbers (Go's
|
|
* `uint64` counters exceed the safe range), and validation keywords such as
|
|
* patterns are not checked.
|
|
*
|
|
* Decode Engine JSON through `Schema.toCodecGoJson`, which reads the `null`
|
|
* Go writes for nil slices and maps as `[]` and `{}`, and for an optional
|
|
* field as absent. The types carry no `| null` for them.
|
|
*
|
|
* Objects are closed: fields the document doesn't declare (fields newer
|
|
* than the pinned version) are dropped on decoding.
|
|
* Each Schema has a type of the same name, the value it decodes to:
|
|
* `Mount` is `typeof Mount.Type`.
|
|
*
|
|
* @stability unstable
|
|
* @since 4.2.0
|
|
*/
|
|
excludeAnnotations:
|
|
- examples
|
|
- default
|
|
- description
|
|
# integers decode as numbers, and string formats aren't checked
|
|
- format
|
|
patches:
|
|
# The element of the pull, push, load and import progress streams: moby's jsonmessage.JSONMessage
|
|
# without the deprecated `progress` and `error` strings.
|
|
- '[{"op":"add","path":"/components/schemas/ProgressMessage","value":{"type":"object","description":"One message of a progress stream (pull, push, load, import), as the Engine sends it. Messages carrying an `errorDetail` fail the stream instead of being emitted.","properties":{"id":{"type":"string","description":"The image or layer the message is about."},"status":{"type":"string","description":"A human-readable status, such as `Downloading` or `Pull complete`."},"stream":{"type":"string","description":"Free-form output, as sent by load and import."},"progressDetail":{"$ref":"#/components/schemas/ProgressDetail"},"errorDetail":{"$ref":"#/components/schemas/ErrorDetail"},"aux":{"type":"object","additionalProperties":true,"description":"Auxiliary data. Push sends `{ Tag, Digest, Size }` for the pushed manifest."}}}}]'
|
|
# Push reports the pushed manifest in `aux`.
|
|
- '[{"op":"add","path":"/components/schemas/PushImageInfo/properties/aux","value":{"type":"object","additionalProperties":true}}]'
|
|
# Secret and config create answer `{ "ID": ... }` (moby's SecretCreateResponse and ConfigCreateResponse), not
|
|
# IDResponse's `Id`.
|
|
- '[{"op":"replace","path":"/paths/~1secrets~1create/post/responses/201/content/application~1json/schema","value":{"type":"object","title":"SecretCreateResponse","required":["ID"],"properties":{"ID":{"type":"string","description":"The ID of the created secret."}}}},{"op":"replace","path":"/paths/~1configs~1create/post/responses/201/content/application~1json/schema","value":{"type":"object","title":"ConfigCreateResponse","required":["ID"],"properties":{"ID":{"type":"string","description":"The ID of the created config."}}}}]'
|