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/enable-managed-api-analysis-linting.md
+22-3Lines changed: 22 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,17 +65,17 @@ To customize or replace the ruleset:
65
65
66
66
1. In Visual Studio Code, select the Azure API Center icon from the Activity Bar.
67
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.
68
+
1. In the folder for your API center resource, open the `ruleset.yaml` file.
69
69
1. Modify or replace the content as needed.
70
-
1. Save your changes to `ruleset.yml`.
70
+
1. Save your changes to `ruleset.yaml`.
71
71
72
72
### Test ruleset locally
73
73
74
74
Before deploying the custom ruleset to your API center, validate it locally. The Azure API Center extension for Visual Studio Code provides integrated support for API specification linting with Spectral.
75
75
76
76
1. In Visual Studio Code, use the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette.
77
77
1. Type **Azure API Center: Set active API Style Guide** and hit **Enter**.
78
-
1. Choose **Select Local File** and specify the `ruleset.yml` file that you customized. Hit **Enter**.
78
+
1. Choose **Select Local File** and specify the `ruleset.yaml` file that you customized. Hit **Enter**.
79
79
80
80
This step makes the custom ruleset the active API style guide for linting.
81
81
@@ -100,6 +100,25 @@ A message notifies you after the rules are successfully deployed to your API cen
100
100
101
101
To see the results of linting with the updated ruleset, view the API analysis reports in the portal.
102
102
103
+
## Analysis profiles
104
+
105
+
You can create multiple analysis profiles to use different rulesets with different APIs. For example, you might want to use one profile for APIs that are in development and a different one for APIs that are in production. The profiles
106
+
107
+
To create an analysis profile:
108
+
109
+
1. In the Azure portal, navigate to your API center.
110
+
1. In the left-hand menu, under **Governance**, select **API Analysis**.
111
+
1. In the API analysis summary, select **Manage analysis profiles** > **+ Create analysis profile**.
112
+
1. In the **Create new analysis profile** pane, enter a **Name** and **Description** for the profile.
113
+
1. In **Ruleset**, select the analyzer type (linting engine) for the ruleset. Currently only Spectral is supported.
114
+
1. Under **Define filter conditions**, add one or more filter conditions for the profile.
115
+
1. Select **Create**.
116
+
117
+
To modify the ruleset:
118
+
119
+
1. In the Azure portal, navigate to your API center.
120
+
121
+
103
122
## Related content
104
123
105
124
* 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).
0 commit comments