Skip to content

Commit 896ed4a

Browse files
authored
Merge pull request #280887 from dlepow/apicvsc
[APIC] VSCode extension updates - July
2 parents dc88abd + 27dc91a commit 896ed4a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
34.7 KB
Loading

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Build, discover, try, and consume APIs from your Azure API center u
44
author: dlepow
55
ms.service: api-center
66
ms.topic: how-to
7-
ms.date: 05/17/2024
7+
ms.date: 07/15/2024
88
ms.author: danlep
99
ms.custom:
1010
# 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
4040
* [Microsoft Kiota extension](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota) - to generate API clients
4141
* [Spectral extension](https://marketplace.visualstudio.com/items?itemName=stoplight.spectral) - to run shift-left API design conformance checks in Visual Studio Code
4242
* [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
4344

4445
## Setup
4546

@@ -83,6 +84,12 @@ Visual Studio Code will open a diff view between the two API specifications. Any
8384

8485
:::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":::
8586

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+
8693
## Discover APIs
8794

8895
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
105112
> [!NOTE]
106113
> Depending on the API, you might need to provide authorization credentials or an API key to try the API.
107114
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+
108118
## Generate HTTP file
109119

110120
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

Comments
 (0)