Contact Us 1-800-596-4880

Creating Custom Governance Rulesets

MuleSoft provides several rulesets in Exchange, such as Anypoint API Best Practices, OpenAPI Best Practices, Authentication Security Best Practices, and Mule API Management Best Practices. Discover rulesets in Exchange by filtering the search by the Rulesets type. See Search for Assets.

Rulesets are implemented using AMF, an open-source framework for managing metadata documents. AMF is used to parse, transform, validate, and render arbitrary metadata models, with built-in features for API models. Anypoint Platform uses AMF to parse RAML, OAS, AsyncAPI, and GraphQL API specifications.

If you need a ruleset other than those provided, you can create your own custom ruleset.

Before You Begin

By writing your own rules, you can govern your APIs with your organization’s specific regulations and standards. Take some time to get familiar with the ruleset development CLI commands and ruleset language concepts before you start customizing rulesets.

You can also submit your ideas for rulesets you would like MuleSoft to provide in future releases on the MuleSoft Ideas Portal.

When you’re ready to get started:

  1. Read Custom Validation for a brief summary of how rulesets validate APIs.

  2. If you plan to create completely new custom rulesets that aren’t based on existing ones, follow the AMF Rulesets tutorial to install the ruleset development CLI.

  3. Install Anypoint CLI. You’ll need this to validate your custom rulesets, generate their documentation, and publish them to Exchange.

Create a Custom Ruleset

To create a custom ruleset, use one of the following approaches:

After you modify or create a custom ruleset, you must validate it to ensure it is coded correctly, generate its documentation, and then publish it to Exchange. See Validating and Publishing Custom Rulesets.