Skip to content

Commit 10820b0

Browse files
authored
Merge pull request #268025 from dlepow/pbupdate
[APIC] VSCode extension updates
2 parents 6301ad2 + afe2ac1 commit 10820b0

File tree

4 files changed

+33
-10
lines changed

4 files changed

+33
-10
lines changed

articles/api-center/manage-apis-azure-cli.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,4 @@ To delete individual API versions and definitions, use [az apic api version dele
142142

143143
* See the [Azure CLI reference for API Center](/cli/azure/apic) for a complete command list, including commands to manage [environments](/cli/azure/apic/environment), [deployments](/cli/azure/apic/api/deployment), [metadata schemas](/cli/azure/apic/metadata-schema), and [API Center services](/cli/azure/apic/service).
144144
* [Import APIs to your API center from API Management](import-api-management-apis.md)
145+
* [Use the Visual Studio extension for API Center](use-vscode-extension.md) to build and register APIs from Visual Studio Code.
407 KB
Loading

articles/api-center/register-apis.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ In this tutorial, you learned how to use the portal to:
131131
> * Register one or more APIs
132132
> * Add an API version with an API definition
133133
134+
As you build out your API inventory, take advantage of other tools to register APIs, such as the [Azure API Center extension for Visual Studio Code](use-vscode-extension.md) and the [Azure CLI](manage-apis-azure-cli.md).
135+
134136
## Next steps
135137

136138
Your API inventory is starting to take shape! Now you can add information about API environments and deployments.

articles/api-center/use-vscode-extension.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
---
22
title: Use Visual Studio Code extension - Azure API Center
3-
description: Discover, try, and consume APIs from your Azure API center using the API Center extension for Visual Studio Code (preview)
3+
description: Build, discover, try, and consume APIs from your Azure API center using the API Center extension for Visual Studio Code (preview)
44
author: dlepow
55
ms.service: api-center
66
ms.topic: how-to
7-
ms.date: 01/24/2024
7+
ms.date: 03/04/2024
88
ms.author: danlep
99
ms.custom:
10-
# Customer intent: As a developer, I want to use my Visual Studio Code environment to discover, try, and consume APIs in my organization's API center.
10+
# Customer intent: As a developer, I want to use my Visual Studio Code environment to build, discover, try, and consume APIs in my organization's API center.
1111
---
1212

1313
# Get started with the Azure API Center extension for Visual Studio Code (preview)
1414

15-
To discover, try, and consume APIs in your [API center](overview.md), you can use the Azure API Center extension in your Visual Studio Code development environment:
15+
To build, discover, try, and consume APIs in your [API center](overview.md), you can use the Azure API Center extension in your Visual Studio Code development environment:
16+
17+
* **Build APIs** - Make APIs you're building discoverable to others by registering them in your API center. Shift-left API design conformance checks into Visual Studio Code with integrated linting support, powered by Spectral.
1618

1719
* **Discover APIs** - Browse the APIs in your API center, and view their details and documentation.
1820

@@ -48,16 +50,35 @@ The following Visual Studio Code extensions are optional and needed only for cer
4850
1. If you're not signed in to your Azure account, select **Sign in to Azure...**, and follow the prompts to sign in.
4951
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.
5052

53+
## Register APIs
54+
55+
Register an API in your API center directly from Visual Studio Code, either by registering it as a one-time operation or with a CI/CD pipeline.
56+
57+
1. Use the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette. Type **Azure API Center: Register API** and hit **Enter**.
58+
1. Select how you want to register your API with your API center:
59+
* **Step-by-step** is best for one-time registration of APIs.
60+
* **CI/CD** adds a preconfigured GitHub or Azure DevOps pipeline to your active Visual Studio Code workspace that is run as part of a CI/CD workflow on each commit to source control. It's recommended to inventory APIs with your API center using CI/CD to ensure API metadata including specification and version stay current in your API center as the API continues to evolve over time.
61+
1. Complete registration steps:
62+
* For **Step-by-step**, select the API center to register APIs with, and answer prompts with information including API title, type, lifecycle stage, version, and specification to complete API registration.
63+
* For **CI/CD**, select either **GitHub** or **Azure DevOps**, depending on your preferred source control mechanism. A Visual Studio Code workspace must be open for the 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.
64+
65+
## API design conformance
66+
67+
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.
68+
69+
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**.
70+
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**.
71+
72+
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**).
73+
74+
:::image type="content" source="media/use-vscode-extension/local-linting.png" alt-text="Screenshot of local-linting in Visual Studio Code." lightbox="media/use-vscode-extension/local-linting.png":::
75+
5176
## Discover APIs
5277

5378
Your API center resources appear in the tree view on the left-hand side. Expand an API center resource to see APIs, versions, definitions, environments, and deployments.
5479

5580
:::image type="content" source="media/use-vscode-extension/explore-api-centers.png" alt-text="Screenshot of API Center tree view in Visual Studio Code." lightbox="media/use-vscode-extension/explore-api-centers.png":::
5681

57-
> [!NOTE]
58-
> Currently, all APIs and other entities shown in the tree view are read-only. You can't create, update, or delete entities in an API center from the extension.
59-
60-
6182
## View API documentation
6283

6384
You can view the documentation for an API definition in your API center and try API operations. This feature is only available for OpenAPI-based APIs in your API center.
@@ -103,8 +124,7 @@ The client is generated.
103124

104125
For details on using the Kiota extension, see [Microsoft Kiota extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota).
105126

106-
107127
## Related content
108128

109129
* [Azure API Center - key concepts](key-concepts.md)
110-
* [Discover APIs with GitHub Copilot Chat and Azure API Center extension for Visual Studio Code](use-vscode-extension-copilot.md)
130+
* [Discover APIs with GitHub Copilot Chat and Azure API Center extension for Visual Studio Code](use-vscode-extension-copilot.md)

0 commit comments

Comments
 (0)