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
Copy file name to clipboardExpand all lines: articles/api-center/use-vscode-extension.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Build, discover, try, and consume APIs from your Azure API center u
4
4
author: dlepow
5
5
ms.service: api-center
6
6
ms.topic: how-to
7
-
ms.date: 05/17/2024
7
+
ms.date: 07/15/2024
8
8
ms.author: danlep
9
9
ms.custom:
10
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.
@@ -40,6 +40,7 @@ The following Visual Studio Code extensions are optional and needed only for cer
40
40
*[Microsoft Kiota extension](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota) - to generate API clients
41
41
*[Spectral extension](https://marketplace.visualstudio.com/items?itemName=stoplight.spectral) - to run shift-left API design conformance checks in Visual Studio Code
42
42
*[Optic CLI](https://github.com/opticdev/optic) - to detect breaking changes between API specification documents
43
+
*[GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) - to generate OpenAPI specification files from API code
43
44
44
45
## Setup
45
46
@@ -83,6 +84,12 @@ Visual Studio Code will open a diff view between the two API specifications. Any
83
84
84
85
:::image type="content" source="media/use-vscode-extension/breaking-changes.png" alt-text="Screenshot of breaking changes detected in Visual Studio Code." lightbox="media/use-vscode-extension/breaking-changes.png":::
85
86
87
+
## Generate OpenAPI specification file from API code
88
+
89
+
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.
90
+
91
+
After generating the OpenAPI specification file and checking for accuracy, you can register the API with your API center using the **Azure API Center: Register API** command.
92
+
86
93
## Discover APIs
87
94
88
95
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.
@@ -105,6 +112,9 @@ You can view the documentation for an API definition in your API center and try
105
112
> [!NOTE]
106
113
> Depending on the API, you might need to provide authorization credentials or an API key to try the API.
107
114
115
+
> [!TIP]
116
+
> You can also use the extension to 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**.
117
+
108
118
## Generate HTTP file
109
119
110
120
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.
0 commit comments