1
0
mirror of https://github.com/docker/docs.git synced 2026-10-23 18:09:02 +03:00
Files
docs/hack/api-docs/testdata/valid.yaml
David Karlsson 9b1f7de05f docs: unify Hub, DVP, and Registry API references (#26048)
@netlify /reference/api/

[Preview the API
reference](https://deploy-preview-26048--docsdocker.netlify.app/reference/api/)

Adds a shared API reference experience for Hub, DVP, and Registry: a
catalog, operation navigation, linked schemas, request and response
examples, and matching HTML and Markdown output. A validation and
generation pipeline prepares the reference data for Hugo and runs as
part of Docker and Netlify builds.

Migrates the three specifications to OpenAPI 3.2, correcting response
shapes, nullable fields, and authentication and token examples. The Hub
migration also corrects SCIM contracts and CSV exports; DVP gains
complete report response schemas and examples. Registry keeps its
documented Hub-specific subset, with authentication and media
negotiation expressed through OpenAPI security and content fields.

Validation is strict for both checks and generation, with no exception
baseline or bypass flag. The build uses the migrated sources directly,
without migration scripts or records.

Page and specification URLs remain stable, including the DVP alias.
Operation and schema anchors change. Engine and Governance retain their
existing references.

Validated locally with Go tests, strict validation of all three
specifications (zero diagnostics), scoped formatting and lint, and a
full Hugo build checking all 176 HTML/Markdown page pairs, example
parity, reference links, and byte-identical published specifications. A
browser check confirmed raw CSV rendering and the generated request
header. No live API requests were made.
2026-09-17 16:56:32 +02:00

111 lines
2.5 KiB
YAML

openapi: 3.2.0
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base
info:
title: Docker documentation tooling fixture
version: "1"
description: Component capability fixture.
servers:
- url: https://api.example.test/v1
security:
- bearerAuth: []
tags:
- name: operations
summary: Operations
kind: nav
description: Fixture operations.
paths:
/events:
get:
operationId: listEvents
tags:
- operations
summary: List events
description: List events.
responses:
"200":
description: Event stream
content:
text/event-stream:
itemSchema:
$ref: ./schemas/event.yaml
example: { event: message, data: hello }
/search:
parameters:
- name: limit
in: query
description: Maximum number of results.
schema:
type: integer
example: 10
servers:
- url: https://search.example.test
query:
operationId: querySearch
tags:
- operations
summary: Search
description: Search.
parameters:
- name: limit
in: query
description: Maximum number of results.
schema:
type: integer
example: 0
responses:
"200":
description: Search result
content:
application/json:
schema: true
example: 0
/public:
get:
operationId: getPublic
tags:
- operations
summary: Public result
description: Public result.
security: []
responses:
"200":
description: A flag
content:
application/json:
schema:
type: boolean
example: false
/items:
get:
operationId: getItems
tags:
- operations
summary: Get items
description: Get items.
responses:
"200":
description: Item
content:
application/json:
schema:
$ref: "#/components/schemas/Item"
description: Description beside a reference.
example: { id: 1, next: { id: 2, next: null } }
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
schemas:
Item:
type: object
required:
- id
properties:
id:
type: integer
next:
anyOf:
- $ref: "#/components/schemas/Item"
- type: "null"