Skip to content

Commit 6688b08

Browse files
committed
Merge branch 'patch-1' of https://github.com/pierceboggan/azure-docs into pbupdate
Update in private repo
2 parents 857bffd + 9da6226 commit 6688b08

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ ms.custom:
1414

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

17+
* **Build APIs** - Make APIs you are 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.
18+
1719
* **Discover APIs** - Browse the APIs in your API center, and view their details and documentation.
1820

1921
* **Try APIs** - Use Swagger UI or REST client to explore API requests and responses.
@@ -48,6 +50,26 @@ 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+
APIs can be registered 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+
2. Select how you want to register your API with your API center. **Step-by-step** is best for one-time registration of APIs. **CI/CD** adds a pre-configured 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 is 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.
59+
* For **Step-by-step**, select the API Center instance to register APIs with, and additional prompts with information including API title, type, lifecycle, version, and specification will guide you through completing API registration.
60+
* For **CI/CD**, select either **GitHub** or **Azure DevOps** depending on your preferred source control mechanism. Note: 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 API Center.
61+
62+
## API Design Conformance
63+
64+
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.
65+
66+
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**.
67+
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**.
68+
69+
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**).
70+
71+
![APIC-Linting](https://github.com/MicrosoftDocs/azure-docs/assets/1091304/8c286941-9487-415c-badb-1481891fb0fc)
72+
5173
## Discover APIs
5274

5375
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.
@@ -103,8 +125,7 @@ The client is generated.
103125

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

106-
107128
## Related content
108129

109130
* [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)
131+
* [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)