Skip to content

Commit 27530be

Browse files
author
gitName
committed
work in progress
1 parent efea196 commit 27530be

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

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

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ To customize or replace the ruleset:
6565

6666
1. In Visual Studio Code, select the Azure API Center icon from the Activity Bar.
6767
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.
6969
1. Modify or replace the content as needed.
70-
1. Save your changes to `ruleset.yml`.
70+
1. Save your changes to `ruleset.yaml`.
7171

7272
### Test ruleset locally
7373

7474
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.
7575

7676
1. In Visual Studio Code, use the **Ctrl+Shift+P** keyboard shortcut to open the Command Palette.
7777
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**.
7979

8080
This step makes the custom ruleset the active API style guide for linting.
8181

@@ -100,6 +100,25 @@ A message notifies you after the rules are successfully deployed to your API cen
100100

101101
To see the results of linting with the updated ruleset, view the API analysis reports in the portal.
102102

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+
103122
## Related content
104123

105124
* 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

Comments
 (0)