You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API developers can also take advantage of features in the extension to [discover and consume APIs](discover-apis-vscode-extension.md) in the API center and ensure [API governance](govern-apis-vscode-extension.md).
21
21
22
-
The following Visual Studio Code extensions is optional and needed only for the specified scenario:
The following Visual Studio Code extensions are needed for the specified scenarios:
24
25
25
-
*[GitHub Actions](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github) - to register APIs using a CI/CD pipeline with GitHub Actions
26
+
*[GitHub Actions](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions) - to register APIs using a CI/CD pipeline with GitHub Actions
27
+
*[Azure Pipelines](https://marketplace.visualstudio.com/items?itemName=ms-azure-devops.azure-pipelines) - to register APIs using a CI/CD pipeline with Azure Pipelines
26
28
*[GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) - to generate OpenAPI specification files from API code
@@ -44,13 +46,13 @@ The following steps register an API in your API center with a CI/CD pipeline. Wi
44
46
45
47
1. Use the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette. Type **Azure API Center: Register API** and hit **Enter**.
46
48
1. Select **CI/CD**.
47
-
1. Select either **GitHub** or **Azure DevOps**, depending on your preferred source control mechanism. A Visual Studio Code workspace must be open for the Azure API Center extension to add a pipeline to your workspace. After the file is added, complete steps documented in the CI/CD pipeline file itself to configure Azure Pipeline/GitHub Action environment variables and identity. On push to source control, the API will be registered in your API center.
49
+
1. Select either **GitHub** or **Azure DevOps**, depending on your preferred source control mechanism. A Visual Studio Code workspace must be open for the Azure API Center extension to add a pipeline to your workspace. After the file is added, complete steps documented in the CI/CD pipeline file itself to configure required environment variables and identity. On push to source control, the API is registered in your API center.
48
50
49
-
Learn more about setting up a [GitHub Actions workflow](register-apis-github-actions.md) to register APIs with your API center.
51
+
Learn more about setting up a [GitHub Actions workflow](register-apis-github-actions.md) to register APIs with your API center.
50
52
51
53
## Generate OpenAPI specification file from API code
52
54
53
-
Use the power of GitHub Copilot with the Azure API Center extension for Visual Studio Code to create an OpenAPI specification file from your API code. Right-click on the API code, select **Copilot** from the options, and select **Generate API documentation**. This will create an OpenAPI specification file.
55
+
Use the power of GitHub Copilot with the Azure API Center extension for Visual Studio Code to create an OpenAPI specification file from your API code. Right-click on the API code, select **Copilot** from the options, and select **Generate API documentation**. GitHub Copilot creates an OpenAPI specification file.
54
56
55
57
> [!NOTE]
56
58
> This feature is available in the pre-release version of the API Center extension.
Copy file name to clipboardExpand all lines: articles/api-center/enable-platform-api-catalog-vscode-extension.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,9 @@ ms.custom:
14
14
15
15
This article shows how to provide enterprise developers access to the Azure API Center platform API catalog (preview) in the Visual Studio Code extension for [Azure API Center](overview.md). Using the platform API catalog, developers can discover APIs in your Azure API center, view API definitions, and optionally generate API clients when they don't have access to manage the API center itself or add APIs to the inventory. Access to the platform API catalog is managed using Microsoft Entra ID and Azure role-based access control.
16
16
17
+
> [!TIP]
18
+
> API developers with access to manage an Azure API center can use additional Visual Studio Code extension features to [register](build-register-apis-vscode-extension.md), [govern](govern-apis-vscode-extension.md), and [discover](di) APIs.
Copy file name to clipboardExpand all lines: articles/api-center/govern-apis-vscode-extension.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,23 @@ description: API developers can use the Azure API Center extension for Visual St
4
4
author: dlepow
5
5
ms.service: azure-api-center
6
6
ms.topic: how-to
7
-
ms.date: 09/23/2024
7
+
ms.date: 10/08/2024
8
8
ms.author: danlep
9
9
ms.custom:
10
10
# Customer intent: As an API developer, I want to use my Visual Studio Code environment to check API compliance in my organization's API center.
11
11
---
12
12
13
13
# Govern APIs with the Azure API Center extension for Visual Studio Code
14
14
15
-
To maximize success of your API governance efforts, it's critical to shift-left governance early into the API development cycle. This approach allows developers to create APIs correctly from the beginning, saving them from wasted development effort and mitigating non-compliant APIs later in the development process.
15
+
To maximize success of your API governance efforts, it's critical to shift-left governance early into the API development cycle. This approach allows API developers to create APIs correctly from the beginning, saving them from wasted development effort and mitigating noncompliant APIs later in the development process.
16
16
17
17
The Azure API Center extension for Visual Studio Code includes the following governance capabilities for API developers:
18
18
19
19
* Evaluating API designs against API style guides as the API is developed in Visual Studio Code.
20
20
* Early detection of breaking changes so that APIs remain reliable and function as expected, preserving the trust of end-users and stakeholders.
21
21
22
+
API developers can also take advantage of features in the extension to [register APIs](build-register-apis-vscode-extension.md) in the API center and [discover and consume APIs](discover-apis-vscode-extension.md).
*[Spectral extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=stoplight.spectral) - to run shift-left API design conformance checks in Visual Studio Code
@@ -28,24 +30,24 @@ The Azure API Center extension for Visual Studio Code includes the following gov
28
30
29
31
## API design conformance
30
32
31
-
To ensure design conformance with organizational standards as you build APIs, the Azure API Center extension for Visual Studio Code provides integrated support for API specification linting with Spectral.
33
+
To ensure design conformance with organizational standards as you build APIs, the Azure API Center extension for Visual Studio Code provides integrated support for API specification linting with [Spectral](https://stoplight.io/open-source/spectral).
32
34
33
35
1. Use the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette. Type **Azure API Center: Set active API Style Guide** and hit **Enter**.
34
36
2. Select one of the default rules provided, or, if your organization has a style guide already available, use **Select Local File** or **Input Remote URL** to specify the active ruleset in Visual Studio Code. Hit **Enter**.
35
37
36
-
Once an active API style guide is set, opening any OpenAPI or AsyncAPI-based specification file will trigger a local linting operation in Visual Studio Code. Results are displayed both inline in the editor, as well as in the Problems window (**View** > **Problems** or **Ctrl+Shift+M**).
38
+
Once an active API style guide is set, opening any OpenAPI or AsyncAPI-based specification file triggers a local linting operation in Visual Studio Code. Results are displayed both inline in the editor and in the Problems window (**View** > **Problems** or **Ctrl+Shift+M**).
37
39
38
40
:::image type="content" source="media/govern-apis-vscode-extension/local-linting.png" alt-text="Screenshot of local-linting in Visual Studio Code." lightbox="media/build-register-apis-vscode-extension/local-linting.png":::
39
41
40
42
## Breaking change detection
41
43
42
-
When introducing new versions of your API, it's important to ensure that changes introduced do not break API consumers on previous versions of your API. The Azure API Center extension for Visual Studio Code makes this easy with breaking change detection for OpenAPI specification documents powered by Optic.
44
+
When introducing new versions of your API, it's important to ensure that changes introduced do not break API consumers on previous versions of your API. The Azure API Center extension for Visual Studio Code makes this easy with breaking change detection for OpenAPI specification documents powered by [Optic](https://github.com/opticdev/optic).
43
45
44
46
1. Use the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette. Type **Azure API Center: Detect Breaking Change** and hit **Enter**.
45
47
2. Select the first API specification document to compare. Valid options include API specifications found in your API center, a local file, or the active editor in Visual Studio Code.
46
48
3. Select the second API specification document to compare. Valid options include API specifications found in your API center, a local file, or the active editor in Visual Studio Code.
47
49
48
-
Visual Studio Code will open a diff view between the two API specifications. Any breaking changes are displayed both inline in the editor, as well as in the Problems window (**View** > **Problems** or **Ctrl+Shift+M**).
50
+
Visual Studio Code opens a diff view between the two API specifications. Any breaking changes are displayed both inline in the editor and in the Problems window (**View** > **Problems** or **Ctrl+Shift+M**).
49
51
50
52
:::image type="content" source="media/govern-apis-vscode-extension/breaking-changes.png" alt-text="Screenshot of breaking changes detected in Visual Studio Code." lightbox="media/build-register-apis-vscode-extension/breaking-changes.png":::
Copy file name to clipboardExpand all lines: articles/api-center/includes/vscode-extension-setup.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,8 +16,9 @@ ms.custom: Include file
16
16
1. Install the Azure API Center extension for Visual Studio Code from the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=apidev.azure-api-center). Install other extensions as needed.
17
17
18
18
> [!NOTE]
19
-
> Where noted, certain features are available only in the extension's pre-release version. [!INCLUDE [vscode-extension-prerelease-features](vscode-extension-prerelease-features.md)]
19
+
> Where noted, certain features are available only in the Azure API Center extension's pre-release version. [!INCLUDE [vscode-extension-prerelease-features](vscode-extension-prerelease-features.md)]
20
20
1. In Visual Studio Code, in the Activity Bar on the left, select API Center.
21
+
21
22
:::image type="content" source="media/vscode-extension-setup/api-center-activity-bar.png" alt-text="Screenshot of API Center extension in the activity bar.":::
22
23
1. If you're not signed in to your Azure account, select **Sign in to Azure...**, and follow the prompts to sign in.
23
-
Select an Azure account with the API center (or API centers) you wish to view APIs from. You can also filter on specific subscriptions if you have many to view from.
24
+
Select an Azure subscription with the API center (or API centers) you wish to view APIs from. You can also filter on specific subscriptions if you have many to view from.
0 commit comments