Skip to content

Commit 0f554b9

Browse files
authored
Merge pull request #291465 from MicrosoftDocs/main
12/5 11:00 AM IST Publish
2 parents 0d4d85b + 3285926 commit 0f554b9

File tree

45 files changed

+160
-160
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+160
-160
lines changed

articles/api-center/enable-api-analysis-linting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Perform API linting and analysis - Azure API Center
33
description: Configure linting of API definitions in your API center to analyze compliance of APIs with the organization's API style guide.
44
ms.service: azure-api-center
55
ms.topic: how-to
6-
ms.date: 06/29/2024
6+
ms.date: 12/03/2024
77
ms.author: danlep
88
author: dlepow
99
ms.custom: devx-track-azurecli
@@ -12,10 +12,10 @@ ms.custom: devx-track-azurecli
1212

1313
# Enable API analysis in your API center - self-managed
1414

15-
This article explains how to enable API analysis in [Azure API Center](overview.md) by manually setting up a linting engine and triggers. API analysis offers linting capabilities to analyze API definitions in your organization's API center. Linting ensures your API definitions adhere to organizational style rules, generating both individual and summary reports. Use API analysis to identify and correct common errors and inconsistencies in your API definitions.
15+
This article explains how to enable API analysis in [Azure API Center](overview.md) by manually setting up a linting engine and triggers. These capabilities analyze your API definitions for adherence to organizational style rules, generating both individual and summary reports. API analysis helps identify and correct common errors and inconsistencies in your API definitions.
1616

1717
> [!NOTE]
18-
> In preview, Azure API Center can also automatically set up a linting engine and any required dependencies and triggers. [Learn more](enable-managed-api-analysis-linting.md).
18+
> In preview, Azure API Center [automatically configures](enable-managed-api-analysis-linting.md) a default linting engine and dependencies for API analysis. If you enable self-managed analysis as described in this article, you override these built-in features.
1919
2020
> [!VIDEO https://www.youtube.com/embed/m0XATQaVhxA]
2121
Lines changed: 23 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,48 @@
11
---
22
title: Managed API linting and analysis - Azure API Center
3-
description: Enable managed linting of API definitions in your API center to analyze compliance of APIs with the organization's API style guide.
3+
description: Automatic linting of API definitions in your API center helps you analyze compliance of APIs with the organization's API style guide.
44
ms.service: azure-api-center
55
ms.topic: how-to
6-
ms.date: 11/01/2024
6+
ms.date: 12/03/2024
77
ms.author: danlep
88
author: dlepow
99
ms.custom:
1010
# Customer intent: As an API developer or API program manager, I want to analyze the API definitions in my organization's API center for compliance with my organization's API style guide.
1111
---
1212

13-
# Enable API analysis in your API center - Microsoft managed
13+
# Analyze APIs in your API center - Microsoft managed
1414

15-
This article explains how to enable API analysis in [Azure API Center](overview.md) without having to manage it yourself (preview). API analysis offers linting capabilities to analyze API definitions in your organization's API center. Linting ensures your API definitions adhere to organizational style rules, generating both individual and summary reports. Use API analysis to identify and correct common errors and inconsistencies in your API definitions.
15+
Your organization's [API center](overview.md) includes built-in, Microsoft-managed linting capabilities (preview) to analyze API definitions for adherence to organizational style rules, generating both individual and summary reports. API analysis identifies and helps you correct common errors and inconsistencies in your API definitions.
1616

17-
> [!IMPORTANT]
18-
> Managed API analysis in API Center sets up a linting engine and necessary dependencies automatically. You can also enable linting and analysis [manually](enable-api-analysis-linting.md) using a custom Azure function. **Disable any function used for manual linting before enabling managed API analysis.**
17+
With API analysis:
1918

19+
* Azure API Center automatically analyzes your API definitions whenever you add or update an API definition. API definitions are linted by default with a [spectral:oas ruleset](https://docs.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules) (API style guide).
20+
* API analysis reports are generated in the Azure portal, showing how your API definitions conform to the style guide.
21+
* You can use the Azure API Center extension for Visual Studio Code to customize and test your own API style guide locally and then deploy it to your API center.
2022

21-
In this scenario:
2223

23-
1. Add a linting ruleset (API style guide) in your API center using the Visual Studio Code extension for Azure API Center.
24-
1. Azure API Center automatically runs linting when you add or update an API definition. It's also triggered for all API definitions when you deploy a ruleset to your API center.
25-
1. Review API analysis reports in the Azure portal to see how your API definitions conform to the style guide.
26-
1. Optionally customize the ruleset for your organization's APIs. Test the custom ruleset locally before deploying it to your API center.
24+
> [!IMPORTANT]
25+
> If you prefer, you can enable [self-managed](enable-api-analysis-linting.md) linting and analysis using a custom Azure function, overriding the built-in capabilities. **Disable any function used for self-managed linting before using managed API analysis.**
2726
2827
## Limitations
2928

30-
* Currently, only OpenAPI specification documents in JSON or YAML format are analyzed.
31-
* By default, you enable analysis with the [`spectral:oas` ruleset](https://docs.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules). To learn more about the built-in rules, see the [Spectral GitHub repo](https://github.com/stoplightio/spectral/blob/develop/docs/reference/openapi-rules.md).
29+
* Currently, only OpenAPI and AsyncAPI specification documents in JSON or YAML format are analyzed.
3230
* Currently, you configure a single ruleset, and it's applied to all OpenAPI definitions in your API center.
3331
* There are [limits](../azure-resource-manager/management/azure-subscription-service-limits.md?toc=/azure/api-center/toc.json&bc=/azure/api-center/breadcrumb/toc.json#api-center-limits) for the maximum number of API definitions analyzed. Analysis can take a few minutes to up to 24 hours to complete.
3432

3533
## Prerequisites
3634

37-
* An API center in your Azure subscription. If you haven't created one already, see [Quickstart: Create your API center](set-up-api-center.md).
38-
* [Visual Studio Code](https://code.visualstudio.com/)
39-
40-
* The following Visual Studio Code extensions:
35+
* An API center in your Azure subscription. If you haven't created one already, see [Quickstart: Create your API center](set-up-api-center.md).
36+
* For customizing the ruleset, [Visual Studio Code](https://code.visualstudio.com/) and the following Visual Studio Code extensions:
4137
* [Azure API Center extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=apidev.azure-api-center)
42-
43-
> [!IMPORTANT]
44-
> Enable managed API analysis using the API Center extension's pre-release version. When installing the extension, choose the pre-release version. Switch between release and pre-release versions any time via the extension's **Manage** button in the Extensions view.
4538
* [Spectral extension for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=stoplight.spectral)
4639

47-
## Enable API analysis using Visual Studio Code
48-
49-
To enable API analysis using the default linting ruleset:
50-
51-
1. In Visual Studio Code, open a folder that you'll use to manage rulesets for Azure API Center.
52-
1. Select the Azure API Center icon from the Activity Bar.
53-
1. In the API Center pane, expand the API center resource in which to enable API analysis.
54-
1. Right-click **Rules** and select **Enable API Analysis**.
55-
56-
:::image type="content" source="media/enable-managed-api-analysis-linting/enable-analysis-visual-studio-code.png" alt-text="Screenshot of enabling API linting and analysis in Visual Studio Code.":::
57-
58-
A message notifies you after API analysis is successfully enabled. A folder for your API center is created in `.api-center-rules`, at the root of your working folder. The folder for your API center contains:
59-
60-
* A `ruleset.yml` file that defines the default API style guide used by the linting engine.
61-
* A `functions` folder with an example custom function that you can use to extend the ruleset.
62-
63-
With analysis enabled, the linting engine analyzes API definitions in your API center based on the default ruleset and generates API analysis reports.
64-
6540
## View API analysis reports
6641

6742
View an analysis summary and the analysis reports for your API definitions in the Azure portal. After API definitions are analyzed, the reports list errors, warnings, and information based on the configured API style guide.
6843

44+
In the API analysis report, also review the ruleset that was used for the analysis and the history of linting passes.
45+
6946
To view an analysis summary in your API center:
7047

7148
1. In the portal, navigate to your API center.
@@ -82,12 +59,13 @@ To view an analysis summary in your API center:
8259
8360
## Customize ruleset
8461

85-
You can customize the default ruleset or replace it as your organization's API style guide. For example, you can [extend the ruleset](https://docs.stoplight.io/docs/spectral/83527ef2dd8c0-extending-rulesets) or add [custom functions](https://docs.stoplight.io/docs/spectral/a781e290eb9f9-custom-functions).
62+
You can use the Azure API Center extension for Visual Studio Code to customize the default ruleset for your API center or replace it as your organization's API style guide. For example, you can [extend the ruleset](https://docs.stoplight.io/docs/spectral/83527ef2dd8c0-extending-rulesets) or add [custom functions](https://docs.stoplight.io/docs/spectral/a781e290eb9f9-custom-functions).
8663

8764
To customize or replace the ruleset:
8865

89-
1. In Visual Studio Code, open the `.api-center-rules` folder at the root of your working folder.
90-
1. In the folder for the API center resource, open the `ruleset.yml` file.
66+
1. In Visual Studio Code, select the Azure API Center icon from the Activity Bar.
67+
1. Open the `.api-center-rules` folder at the root of your working folder.
68+
1. In the folder for your API center resource, open the `ruleset.yml` file.
9169
1. Modify or replace the content as needed.
9270
1. Save your changes to `ruleset.yml`.
9371

@@ -103,6 +81,9 @@ Before deploying the custom ruleset to your API center, validate it locally. The
10381

10482
Now, when you open an OpenAPI-based API definition file, a local linting operation is automatically triggered in Visual Studio Code. Results are displayed inline in the editor and in the **Problems** window (**View > Problems** or **Ctrl+Shift+M**).
10583

84+
> [!TIP]
85+
> API developers in your organization can also use this local linting capability to help improve their API definitions before registering APIs in your API center.
86+
10687
:::image type="content" source="media/enable-managed-api-analysis-linting/validate-local-linting.png" alt-text="Screenshot of linting an API definition in Visual Studio Code." lightbox="media/enable-managed-api-analysis-linting/validate-local-linting.png":::
10788

10889
Review the linting results. Make any necessary adjustments to the ruleset and continue to test it locally until it performs the way you want.
@@ -121,4 +102,5 @@ To see the results of linting with the updated ruleset, view the API analysis re
121102

122103
## Related content
123104

105+
* To learn more about the default built-in ruleset, see the [Spectral GitHub repo](https://github.com/stoplightio/spectral/blob/develop/docs/reference/openapi-rules.md).
124106
* [Enable API analysis in your API center - self-managed](enable-api-analysis-linting.md)
-95 KB
Loading

articles/api-center/synchronize-api-management-apis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: devx-track-azurecli
1212

1313
# Synchronize APIs from an API Management instance
1414

15-
This article shows how to create a link (preview) to an API Management instance so that the instances's APIs are continuously kept up to date in your [API center](overview.md) inventory.
15+
This article shows how to create a link to an API Management instance so that the instances's APIs are continuously kept up to date in your [API center](overview.md) inventory.
1616

1717
## About linking an API Management instance
1818

articles/api-management/api-management-howto-create-groups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ API Management has the following immutable groups:
2323
> [!NOTE]
2424
> At any time, a service owner can update the administrator [email settings](api-management-howto-configure-notifications.md#configure-email-settings) that are used in notifications from your API Management instance.
2525
26-
* **Developers** - Authenticated developer portal users fall into this group. Developers are the customers that build applications using your APIs. Developers are granted access to the developer portal and build applications that call the operations of an API.
26+
* **Developers** - Authenticated developer portal [users](api-management-howto-create-or-invite-developers.md) fall into this group. Developers are the customers that build applications using your APIs. Developers are granted access to the developer portal and build applications that call the operations of an API.
2727
* **Guests** - Unauthenticated developer portal users, such as prospective customers visiting the developer portal of an API Management instance fall into this group. They can be granted certain read-only access, such as the ability to view APIs but not call them.
2828

2929
In addition to these system groups, administrators can create custom groups or [use external groups in associated Microsoft Entra tenants][leverage external groups in associated Azure Active Directory tenants]. Custom and external groups can be used alongside system groups in giving developers visibility and access to API products. For example, you could create one custom group for developers affiliated with a specific partner organization and allow them access to the APIs from a product containing relevant APIs only. A user can be a member of more than one group.

0 commit comments

Comments
 (0)