8 CI/CD for API artifacts 1: Source-stage governance controls

 

This chapter covers

  • Defining the automated governance controls for API artifact source files in your pipeline
  • Executing the governance controls in the pipeline
  • Creating and managing multifile API definitions

Large software projects can involve multiple teams building many external RESTful APIs for an organization. Centralized manual governance is one way to ensure APIs meet the organization’s API consistency and usability standards. But as discussed in chapter 1, centralized manual governance doesn’t scale, leading to reduced agility, long lead times, and developer frustration. How can governance teams minimize the need for manual design reviews and move toward consistently applied, automated self-service reviews to support many development teams?

Automated governance isn’t the only problem. During the software delivery process, several API artifacts are generated from the API definition files. API artifacts are API definition files and the by-products generated from them, provided for API consumers and other internal stakeholders to use. They include API reference documentation, client SDKs, alternative API definition formats, API score reports, and more. Consistency suffers when dev teams create these artifacts using manual and ad hoc processes. So how can the organization provide a consistent way for teams to generate API artifacts?

8.1 The problem with sharing API design proposals

8.2 Version control to the rescue

8.3 Auto-validating the MDRC

8.4 Introduction to GitHub Actions

8.5 Setting up the MDRC

8.5.1 Check the work ticket reference

8.5.2 Create a PR template

8.5.3 Run API linting in the pipeline

8.5.4 Run breaking change checks in the pipeline

8.5.5 Run prose linting

8.5.6 Requiring PR approvals from the governance team

8.6 Automated governance controls

8.7 PR builds

8.8 PR description policies

8.9 Code owners

8.10 Prose linting

8.11 Supporting API design proposals in the pipeline

8.11.1 Understand the users and their requirements