An API registry is a runtime catalog where teams upload, share, browse, search, view, update, and remove API definition files and related schemas. Its programmatic API lets applications retrieve artifacts for runtime message validation and other downstream uses. section 9.1.2 section 8.3
Organize registry content around these operational capabilities:
- Store definitions as artifacts, group logically related artifacts, and use artifact references for reusable schemas and components. section 9.1.2
- Support formats including OpenAPI, AsyncAPI, GraphQL, Apache Avro, Protocol Buffers, JSON Schema, WSDL, and XSD. section 9.1.2
- Expose definitions to teams, applications, and downstream systems, improving schema and component discovery, consistency, and reuse. section 9.1.2 section 9.5
Publish an OpenAPI artifact
Start Apicurio Registry with Docker Compose, then publish a product-catalog definition to group acmeapis. The request uses productsapi as the artifact identifier, declares OPENAPI as its type, uploads the YAML file, and updates an existing artifact when present. In a build pipeline, lint the transformed definition before publishing it.
curl -v -X POST 'http://localhost:9090/apis/registry /v2/groups/acmeapis/artifacts?ifExists=UPDATE' #1 --header 'Content-Type: application/x-yaml' #2 --header 'X-Registry-ArtifactId: productsapi' #3 --header 'X-Registry-ArtifactType: OPENAPI' #4 --data-binary "@chapter8/apis/product-catalog.oas.yaml" #5 --output created-artifact.json #6 --fail-with-body #7
Inspect the publication command to see how registry group, artifact identity, format, source file, update behavior, and failure handling are supplied. section 9.1.2
