liveBook · Manning

Api artifact

As explained in Automating API Delivery

An API artifact is an API definition file or a derived product such as documentation, a client SDK, an alternative API format, or a scoring report.

An API artifact is an API definition file or a product derived from one, such as reference documentation, a client SDK, an alternative definition format, or an API score report. Generating these through a CI/CD pipeline gives teams a repeatable alternative to manual, ad hoc production. Source-stage checks provide design feedback; later stages prepare approved definitions for consumers and publication. section 8.0 section 9.0

A build-stage workflow can prepare a definition for a particular audience:

  • Bundle a multifile definition into one file, then filter or rewrite it to produce the intended view. section 9.1
  • Sort fields consistently, remove unused components, or create a Postman collection from an OpenAPI file. section 9.1
  • Upload the processed definition to an artifact store so later pipeline steps can retrieve it or publish it through a developer portal. section 9.1

Internal and external views

Suppose one OpenAPI definition contains both internal- and external-facing endpoints. Mark internal objects with x-internal:true, then filter them out when generating the external artifact. The published view can also replace an internal server URL with an external sandbox URL. Automating those transformations keeps the two views distinct without relying on manual edits. section 9.1

Table 9.1 Summary of the generated API definition artifact
Type of artifact
Users of the artifact
What do they need the artifact for?
Source files the artifact is generated from
Tool to generate the artifact
Where artifact will be stored
Processed OpenAPI definition
• External API consumers
• Developer portal
• Later stages of the continuous integration/continuous delivery (CI/CD) pipeline
• Shared with external API consumers
• Used for generating the API reference in the developer portal
• Used to generate SDKs
Multifile API definitions
Redocly CLI, openapi- format, openapi- filter
Apicurio API registry

The artifact summary traces a processed OpenAPI definition from multifile source files through generation tools to an API registry, and identifies its consumers and downstream uses. section 9.1

How Automating API Delivery covers it

How deep it goes
Details build-stage definition transformations and describes generating and publishing artifacts through a deployment pipeline.
Examples
Uses multifile OpenAPI bundling, x-internal:true filtering, Postman collection creation, and a processed definition stored in Apicurio API registry.
What it assumes
Assumes familiarity with API definitions while defining the CI/CD pipeline and illustrating the purpose of an OpenAPI extension.
What you can do after
Apply it via GitHub Actions to generate and publish API artifacts to internal artifact stores.
How it connects
Connects API artifacts to API definitions, automated governance, CI/CD pipelines, developer portals, client SDKs, and artifact stores.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Automating API Delivery. The section links point to the parts of the book it draws on.