Skip to content

Commit 9a11949

Browse files
authored
Merge pull request #272237 from dlepow/pbvsc
[APIC] VSCode 0.3.0 updates
2 parents 8eb0d4d + 3900f62 commit 9a11949

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed
307 KB
Loading

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ms.custom:
1414

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

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.
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. Ensure that new API versions don't break API consumers with breaking change detection.
1818

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

@@ -42,6 +42,7 @@ The following Visual Studio Code extensions are optional and needed only for cer
4242
* [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
4343
* [Microsoft Kiota extension](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota) - to generate API clients
4444
* [Spectral extension](https://marketplace.visualstudio.com/items?itemName=stoplight.spectral) - to run shift-left API design conformance checks in Visual Studio Code
45+
* [Optic CLI](https://github.com/opticdev/optic) - to detect breaking changes between API specification documents
4546

4647
## Setup
4748

@@ -73,12 +74,26 @@ Once an active API style guide is set, opening any OpenAPI or AsyncAPI-based spe
7374

7475
:::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":::
7576

77+
## Breaking change detection
78+
79+
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.
80+
81+
1. Use the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette. Type **Azure API Center: Detect Breaking Change** and hit **Enter**.
82+
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.
83+
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.
84+
85+
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**).
86+
87+
:::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":::
88+
7689
## Discover APIs
7790

7891
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.
7992

8093
:::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":::
8194

95+
Search for APIs within an API Center by using the search icon shown in the **Apis** tree view item.
96+
8297
## View API documentation
8398

8499
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.

0 commit comments

Comments
 (0)