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
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ ms.custom:
14
14
15
15
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:
16
16
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
+
17
19
***Discover APIs** - Browse the APIs in your API center, and view their details and documentation.
18
20
19
21
***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
48
50
1. If you're not signed in to your Azure account, select **Sign in to Azure...**, and follow the prompts to sign in.
49
51
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.
50
52
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**).
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.
103
125
104
126
For details on using the Kiota extension, see [Microsoft Kiota extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-graph.kiota).
105
127
106
-
107
128
## Related content
108
129
109
130
*[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