Validating an API or product document by using the governance service
How to use governance rulesets to validate and enforce organizational governance policies and best practices. You can run validation scans on API and product documents from the API Manager UI, the API Designer UI, or the toolkit CLI.
Before you begin
Before you can run validation
scans you must have governance enabled on your
management subsystem by your system administrator. See Enabling governance on
Kubernetes, and Enabling governance on
VMware for more information. If governance is enabled in
your deployment, the Governance icon is displayed in the side menu bar. If you
are only a catalog or space member of a provider organization, a Governance
tab is visible in the catalog menu.
The governance service is available to all user roles.
About this task
- API
- Rulesets to validate your API documents.
- Provider organization rulesets - these are custom rulesets that contain the rules that are created in, and are specific to, your provider organization for validating APIs.
- Global rulesets - these are pre-configured IBM and Spectral rulesets that contain the rules that are shared with your provider organization for validating APIs, and cannot be edited. Note that the Spectral ruleset names are prefixed by spectral-, and that their version matches the version of that ruleset that's available in Spectral.
- Product
- Rulesets to validate your product documents. Note that the validation scan of products looks
only at the product yaml; it does not include the scanning of any API documents that the product
refers to.
- Provider organization rulesets - these are custom rulesets that contain the rules that are created in, and are specific to, your provider organization for validating products.
- Global rulesets - these are pre-configured custom rulesets that contain the rules that are shared with your provider organization for validating products, and cannot be edited.
You can create your own provider organization rulesets to validate your Swagger, OpenAPI, AsyncAPI, and product documents against, or use the global rulesets that are provided for your organization. For more information about configuring rulesets, see Configuring governance in the API Manager.
Governance in API Connect is based on the open source Spectral linter; for more information about Spectral, see https://docs.stoplight.io/docs/spectral/674b27b261c3c-overview.
You can complete the instructions that are in this task by using the API Manager UI, or by using API Designer when the UI is online, and is connected to a cloud instance that has the governance microservice enabled on it. You can also use the toolkit CLI; for details see Validating an API or product document by using the toolkit CLI.
Procedure
Results
What to do next
You can also run validation scans on a catalog or space, to check one or more of the API documents that it contains. For more information, see Scanning your catalogs and spaces.