Skip to content

Commit e2dca5c

Browse files
author
gitName
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into azip
2 parents 5567143 + 2f29b2e commit e2dca5c

File tree

237 files changed

+2001
-2295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+2001
-2295
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3100,6 +3100,16 @@
31003100
"redirect_url": "https://docs.sendgrid.com/for-developers/partners/microsoft-azure-2021#create-a-twilio-sendgrid-account",
31013101
"redirect_document_id": false
31023102
},
3103+
{
3104+
"source_path_from_root": "/articles/synapse-analytics/whats-new.md",
3105+
"redirect_url": "/fabric/get-started/whats-new",
3106+
"redirect_document_id": false
3107+
},
3108+
{
3109+
"source_path_from_root": "/articles/synapse-analytics/whats-new-archive.md",
3110+
"redirect_url": "/fabric/get-started/whats-new",
3111+
"redirect_document_id": false
3112+
},
31033113
{
31043114
"source_path_from_root": "/articles/terraform/terrafom-quickstart.md",
31053115
"redirect_url": "/azure/terraform/terraform-create-configuration",

articles/api-center/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
items:
4747
- name: Use metadata for governance
4848
href: metadata.md
49+
- name: Govern APIs - VS Code extension
50+
href: govern-apis-vscode-extension.md
4951
- name: API analysis - Microsoft managed
5052
href: enable-managed-api-analysis-linting.md
5153
- name: API analysis - self-managed
@@ -56,6 +58,8 @@
5658
href: find-nonproduction-api-requests-dev-proxy.md
5759
- name: API discovery and consumption
5860
items:
61+
- name: Discover and consume APIs - VS Code extension
62+
href: discover-apis-vscode-extension.md
5963
- name: Enable platform API catalog - VS Code extension
6064
href: enable-platform-api-catalog-vscode-extension.md
6165
- name: Self-host Azure API Center portal

articles/api-center/build-register-apis-vscode-extension.md

Lines changed: 29 additions & 141 deletions
Large diffs are not rendered by default.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
---
2+
title: Discover APIs - VS Code extension
3+
description: API developers can use the Azure API Center extension for Visual Studio Code to discover APIs in their organization's API center.
4+
author: dlepow
5+
ms.service: azure-api-center
6+
ms.topic: how-to
7+
ms.date: 10/16/2024
8+
ms.author: danlep
9+
ms.custom:
10+
# Customer intent: As an API developer, I want to use my Visual Studio Code environment to discover and consume APIs in my organizations API center.
11+
---
12+
13+
# Discover and consume APIs with the Azure API Center extension for Visual Studio Code
14+
15+
API developers in your organization can discover and consume APIs in your [API center](overview.md) by using the Azure API Center extension for Visual Studio Code. The extension provides the following features:
16+
17+
* **Discover APIs** - Browse the APIs in your API center, and view their details and documentation.
18+
19+
* **Consume APIs** - Generate API SDK clients in their favorite language including JavaScript, TypeScript, .NET, Python, and Java, using the Microsoft Kiota engine that generates SDKs for Microsoft Graph, GitHub, and more.
20+
21+
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 ensure [API governance](govern-apis-vscode-extension.md).
22+
23+
> [!TIP]
24+
> If you want enterprise app developers to discover APIs in a centralized location, optionally enable a [platform API catalog](enable-platform-api-catalog-vscode-extension.md) for your API center in Visual Studio Code. The platform API catalog is a read-only view of the API inventory.
25+
26+
[!INCLUDE [vscode-extension-basic-prerequisites](includes/vscode-extension-basic-prerequisites.md)]
27+
28+
* [REST client extension](https://marketplace.visualstudio.com/items?itemName=humao.rest-client) - to send HTTP requests and view the responses in Visual Studio Code directly
29+
* [Microsoft Kiota extension](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota) - to generate API clients
30+
31+
[!INCLUDE [vscode-extension-setup](includes/vscode-extension-setup.md)]
32+
33+
## Discover APIs
34+
35+
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.
36+
37+
:::image type="content" source="media/discover-apis-vscode-extension/explore-api-centers.png" alt-text="Screenshot of API Center tree view in Visual Studio Code." lightbox="media/discover-apis-vscode-extension/explore-api-centers.png":::
38+
39+
Search for APIs within an API Center by using the search icon shown in the **Apis** tree view item.
40+
41+
## View API documentation
42+
43+
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.
44+
45+
1. Expand the API Center tree view to show an API definition.
46+
1. Right-click on the definition, and select **Open API Documentation**. A new tab appears with the Swagger UI for the API definition.
47+
48+
:::image type="content" source="media/discover-apis-vscode-extension/view-api-documentation.png" alt-text="Screenshot of API documentation in Visual Studio Code." lightbox="media/discover-apis-vscode-extension/view-api-documentation.png":::
49+
50+
1. To try the API, select an endpoint, select **Try it out**, enter required parameters, and select **Execute**.
51+
52+
> [!NOTE]
53+
> Depending on the API, you might need to provide authorization credentials or an API key to try the API.
54+
55+
> [!TIP]
56+
> Using the pre-release version of the extension, you can generate API documentation in Markdown, a format that's easy to maintain and share with end users. Right-click on the definition, and select **Generate Markdown**.
57+
58+
## Generate HTTP file
59+
60+
You can view a `.http` file based on the API definition in your API center. If the REST Client extension is installed, you can make requests directory from the Visual Studio Code editor. This feature is only available for OpenAPI-based APIs in your API center.
61+
62+
1. Expand the API Center tree view to show an API definition.
63+
1. Right-click on the definition, and select **Generate HTTP File**. A new tab appears that renders a .http document populated by the API specification.
64+
65+
:::image type="content" source="media/discover-apis-vscode-extension/generate-http-file.png" alt-text="Screenshot of generating a .http file in Visual Studio Code." lightbox="media/discover-apis-vscode-extension/generate-http-file.png":::
66+
67+
1. To make a request, select an endpoint, and select **Send Request**.
68+
69+
> [!NOTE]
70+
> Depending on the API, you might need to provide authorization credentials or an API key to make the request.
71+
72+
## Generate API client
73+
74+
Use the Microsoft Kiota extension to generate an API client for your favorite language. This feature is only available for OpenAPI-based APIs in your API center.
75+
76+
1. Expand the API Center tree view to show an API definition.
77+
1. Right-click on the definition, and select **Generate API Client**. The **Kiota OpenAPI Generator** pane appears.
78+
1. Select the API endpoints and HTTP operations you wish to include in your SDKs.
79+
1. Select **Generate API client**.
80+
1. Enter configuration details about the SDK name, namespace, and output directory.
81+
1. Select the language for the generated SDK.
82+
83+
:::image type="content" source="media/discover-apis-vscode-extension/generate-api-client.png" alt-text="Screenshot of Kiota OpenAPI Explorer in Visual Studio Code." lightbox="media/discover-apis-vscode-extension/generate-api-client.png":::
84+
85+
The client is generated.
86+
87+
For details on using the Kiota extension, see [Microsoft Kiota extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota).
88+
89+
## Export API specification
90+
91+
You can export an API specification from a definition and then download it as a file.
92+
93+
To export a specification in the extension's tree view:
94+
95+
1. Expand the API Center tree view to show an API definition.
96+
1. Right-click on the definition, and select **Export API Specification Document**. A new tab appears that renders an API specification document.
97+
98+
:::image type="content" source="media/discover-apis-vscode-extension/export-specification.png" alt-text="Screenshot of exporting API specification in Visual Studio Code." lightbox="media/discover-apis-vscode-extension/export-specification.png":::
99+
100+
You can also export a specification using the Command Palette:
101+
102+
1. Type the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette.
103+
1. Select **Azure API Center: Export API Specification Document**.
104+
1. Make selections to navigate to an API definition. A new tab appears that renders an API specification document.
105+
106+
## Related content
107+
108+
* [Azure API Center - key concepts](key-concepts.md)
109+
* [Build and register APIs with the Azure API Center extension for Visual Studio Code](build-register-apis-vscode-extension.md)
110+
* [Govern APIs with the Azure API Center extension for Visual Studio Code](govern-apis-vscode-extension.md)
111+
* [Enable and view platform API catalog in Visual Studio Code](enable-platform-api-catalog-vscode-extension.md)
112+

articles/api-center/enable-platform-api-catalog-vscode-extension.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ ms.custom:
1414

1515
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.
1616

17+
> [!TIP]
18+
> The Visual Studio Code extension provides more features for API developers who have permissions to manage an Azure API center. For example, API developers can register APIs in the API center directly or using CI/CD pipelines. [Learn more](build-register-apis-vscode-extension.md)
19+
1720
## Prerequisites
1821

1922
### For API center administrators
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Govern APIs - VS Code extension
3+
description: API developers can use the Azure API Center extension for Visual Studio Code to govern their organization's APIs.
4+
author: dlepow
5+
ms.service: azure-api-center
6+
ms.topic: how-to
7+
ms.date: 10/16/2024
8+
ms.author: danlep
9+
ms.custom:
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+
---
12+
13+
# Govern APIs with the Azure API Center extension for Visual Studio Code
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 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+
17+
The Azure API Center extension for Visual Studio Code includes the following governance capabilities for API developers:
18+
19+
* Evaluating API designs against API style guides as the API is developed in Visual Studio Code.
20+
* Early detection of breaking changes so that APIs remain reliable and function as expected, preserving the trust of end-users and stakeholders.
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).
23+
24+
[!INCLUDE [vscode-extension-basic-prerequisites](includes/vscode-extension-basic-prerequisites.md)]
25+
26+
* [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
27+
* [Optic CLI](https://github.com/opticdev/optic) - to detect breaking changes between API specification documents
28+
29+
[!INCLUDE [vscode-extension-setup](includes/vscode-extension-setup.md)]
30+
31+
## API design conformance
32+
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).
34+
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**.
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**.
37+
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**).
39+
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/govern-apis-vscode-extension/local-linting.png":::
41+
42+
## Breaking change detection
43+
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).
45+
46+
1. Use the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette. Type **Azure API Center: Detect Breaking Change** and hit **Enter**.
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.
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.
49+
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**).
51+
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/govern-apis-vscode-extension/breaking-changes.png":::
53+
54+
55+
## Related content
56+
57+
* [Azure API Center - key concepts](key-concepts.md)
58+
* [Build and register APIs with the Azure API Center extension for Visual Studio Code](build-register-apis-vscode-extension.md)
59+
* [Discover and consume APIs with the Azure API Center extension for Visual Studio Code](discover-apis-vscode-extension.md)
60+
* [Enable and view platform API catalog in Visual Studio Code](enable-platform-api-catalog-vscode-extension.md)
61+
3.14 KB
Loading
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
title: Include file
3+
description: Include file
4+
services: api-center
5+
author: dlepow
6+
7+
ms.service: azure-api-center
8+
ms.topic: include
9+
ms.date: 10/02/2024
10+
ms.author: danlep
11+
ms.custom: Include file
12+
---
13+
14+
## Prerequisites
15+
16+
* One or more API centers in your Azure subscription.
17+
18+
* Currently, you need to be assigned the Contributor role or higher permissions to manage APIs with the extension.
19+
20+
* [Visual Studio Code](https://code.visualstudio.com/)
21+
22+
* [Azure API Center extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=apidev.azure-api-center)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Include file
3+
description: Include file
4+
services: api-center
5+
author: dlepow
6+
7+
ms.service: azure-api-center
8+
ms.topic: include
9+
ms.date: 10/02/2024
10+
ms.author: danlep
11+
ms.custom: Include file
12+
---
13+
14+
## Setup
15+
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+
18+
> [!NOTE]
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+
1. In Visual Studio Code, in the Activity Bar on the left, select API Center.
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.":::
23+
1. If you're not signed in to your Azure account, select **Sign in to Azure...**, and follow the prompts to sign in.
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

Comments
 (0)