To create a configured API in Tanzu Service Mesh, you must provide its configuration. The configuration points to the GitHub repository and branch where the API specification and other API documents are stored.

After you select a GitHub repository and a branch in the API configuration, you must select the primary API document (the API specification) and optionally other API reference and extension documents in the selected branch. Tanzu Service Mesh reads the API definition from the API specification and creates a configured API based on the API definition.

Note:

Currently, Tanzu Service Mesh supports only public GitHub repositories.

The following procedure describes how to create a configured API in Tanzu Service Mesh.

Prerequisites

Procedure

  1. In the navigation pane on the left, click API Management.
  2. On the API Management page, click New API.
  3. On the Basic Details page of the Configure API wizard, provide the following information.
    • Name. Enter a name for the API to help identify it in Tanzu Service Mesh.

    • Repository Location. Select a git account/organization from the list of GitHub integration accounts that exist in Tanzu Service Mesh and then select the repository that contains the API documents.

    • Default Branch. Select the primary branch in the repository, for example, the main branch.

    Note:

    You can optionally add a description for the API. Click Add Description and enter the description you want.

  4. (Optional) On the API Documents page, select one of the following:
    • No API documents. Select this option if your team is still setting up a git repository and you don't have API documents yet, or the documents are unavailable for some other reason. When the documents are ready in the git repository, you can can add them from the Tanzu Service Mesh UI. Tanzu Service Mesh will read them and display the contents of the API specification on the API details page. For information about adding API documents for a configured API, see Explore the APIs (see step 5).

    • Add API documents. Select the API documents (yaml files) for the configured API. Select the primary API document (the API specification) and optionally API reference and extension documents. To add an API reference or extension document, click Add Document and select the document.

  5. On the Summary page, review the API configuration.

    You can edit the basic configuration details, the git repository details, and make changes to the API documents. Click Edit in the appropriate section.

  6. To save the API configuration, click Save.

Results

Tanzu Service Mesh creates a configured API. The new configured API is added to the API Management page. You can view the contents of the API specification (the API endpoints) on the API details page.

To validate the API specification, Tanzu Service Mesh automatically scans it and generates scores to indicate the quality and health of the API specification as it relates to documentation quality, compliance with OpenAPI standards, security, and governance (breaking changes).

You and other developers can collaborate on the API specification by exchanging comments on problems in the specification, fixes for a problem, and improvements to the specification.

What to do next