Reunite's scorecard feature enables you to add and create sets of rules and test your API description files against them. Using these rules you can maintain quality across your existing APIs and ensure that newly-added or updated APIs match your criteria. An API scorecard can include multiple sets of rules, corresponding to different quality levels.
Provide custom team label and team metadata property.
Level Object
Option
Type
Description
name
string
Name of the level.
extends
[string]
Inherit configurations. In case of conflict, priority goes to configurations further down the list. Finally, explicit declarations inline takes precedence over configurations inherited through the extends feature. Built-in configurations include recommended and minimal.
The following sample ruleset configuration file is for the Baseline level and applies the Redocly minimal ruleset and adds a few additional built-in rules:
api-ruleset-baseline.yaml
extends:- minimal
rules:
no-ambiguous-paths: error # This rule enforces paths to match only one PathItem entry, including template variables
no-invalid-schema-examples: error # This rule enforces schema examples to match their declared types
spec-strict-refs: error # This rule enforces $refs to reference elements in the component section
extends:- minimal
rules:
no-ambiguous-paths: error # This rule enforces paths match only one PathItem entry, including template variables
no-invalid-schema-examples: error # This rule enforces schema examples to match their declared types
spec-strict-refs: error # This rule enforces $refs to reference elements in the component section
paths-kebab-case: error # This rule enforces all paths to be written using kebab case
rule/operationId-casing: # The following configurable three rules enforce camel case for operation ids, parameters, and schema properties
subject:
type: Operation
property: operationId
assertions:
casing: camelCase
rule/parameter-casing:
subject:
type: Parameter
assertions:
casing: camelCase
rule/schema-properties-casing:
subject:
type: Schema
property: properties
assertions:
casing: camelCase
The following sample ruleset configuration is for the Gold level:
api-ruleset-gold.yaml
extends:- minimal
rules:
no-ambiguous-paths: error # This rule enforces paths match only one PathItem entry, including template variables
no-invalid-schema-examples: error # This rule enforces schema examples to match their declared types
spec-strict-refs: error # This rule enforces $refs to reference elements in the component section
paths-kebab-case: error # This rule enforces all paths to be written using kebab case
rule/operationId-casing: # The following configurable three rules enforce camel case for operation ids, parameters, and schema properties
subject:
type: Operation
property: operationId
assertions:
casing: camelCase
rule/parameter-casing:
subject:
type: Parameter
assertions:
casing: camelCase
rule/schema-properties-casing:
subject:
type: Schema
property: properties
assertions:
casing: camelCase
rule/headers-include-example: # The following two configurable rules enforce that headers and parameters include examples
subject:
type: Header
assertions:
requireAny:- example
- examples
rule/params-must-include-examples:
subject:
type: Parameter
assertions:
requireAny:- example
- examples
mutuallyExclusive:- example
- examples
rule/operation-security-defined: # This configurable rule enforces the security property of the Paths Operation OpenAPI node type is defined
subject:
type: Operation
property: security
where:- subject:
type: Paths
assertions:
defined:true
assertions:
defined:true
message:"Property `security` must be defined"
rule/terms-url: # This configurable rule enforces the terms of service property of the Info OpenAPI node type is defined
subject:
type: Info
property: termsOfService
assertions:
defined:true
Related options
Check out the different ways you can customize the behavior and appearance of integrated API documentation on the OpenAPI reference page.
Learn more about the different ways you can configure an API catalog, using the Catalog reference.
Resources
Learn more about the Scorecard feature including what it displays and where to find the reports.
Learn how to add either Redocly built-in rule sets or custom rule sets to the scorecard for your projects in Configure scorecard.