# `scorecardClassic`

The `scorecard` property is deprecated.
Use `scorecardClassic` instead.
The `scorecard` property continues to work with a deprecation warning.


With 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.

## Options

| Option | Type | Description |
|  --- | --- | --- |
| levels | [[Level Object](#level-object)] | List of levels to score against. |
| targets | [[Target Object](#target-object)] | Provide custom `minimumLevel` for specific targets. |
| teamMetadataProperty | [[Team Metadata Object](#team-metadata-object)] | Provide custom team label and team metadata property. |
| ignore | [string] | Provide a list of files or directories to skip when calculating scorecard. |
| fromProjectUrl | [string] | **VS Code extension only.** Validates your local OpenAPI files against scorecard rules defined in your Reunite project.
You can get the URL by opening your project in Reunite and copying the full URL from the browser.
The URL must use HTTPS and must be from a `redocly.com` domain. |


### 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. |
| rules | [Rule Object](https://redocly.com/docs/cli/configuration/rules) | Change the severity level of any rules in your extended configurations.
Some rules may also receive additional configurations. |


### Target Object

| Option | Type | Description |
|  --- | --- | --- |
| minimumLevel | string | The minimum level refers to a level using the name defined in `levels`. |
| where | [Where Object](#where-object) | Specify which API descriptions to apply the `minimumLevel` to. |
| rules | [Rule Object](https://redocly.com/docs/cli/configuration/rules) | Customize rules for the target.
Useful for disabling rules based on the metadata. |


### Where Object

| Option | Type | Description |
|  --- | --- | --- |
| metadata | [Where Metadata Object](#where-metadata-object) | Specify which API descriptions to apply the `minimumLevel` to based on the metadata. |


### Where Metadata Object

| Option | Type | Description |
|  --- | --- | --- |
| *(name of metadata key)* | string | Specify the exact value of the metadata key to match against.
Also supports ISO 8601 date range.
Specify a string with a leading and trailing slash to match against a regex. |


### Example


```yaml
where:
  metadata:
    title: 'My API'
    version: '/^1\\.0\\.*/'
```

### Team Metadata Object

| Option | Type | Description |
|  --- | --- | --- |
| property | string | The property name to use for the team name. |
| label | string | The label to use for the team name. |
| default | string | The default team name to use when the property is not found. |


## Examples

The following example `redocly.yaml` file configuration adds three levels to the project's API scorecard: Baseline, Silver, and Gold:


```yaml redocly.yaml
scorecardClassic:
  levels:
    - name: Baseline
      extends:
        - ./api-ruleset-baseline.yaml
    - name: Silver
      extends:
        - ./api-ruleset-silver.yaml
    - name: Gold
      extends:
        - ./api-ruleset-gold.yaml
```

The following sample ruleset configuration file is for the Baseline level and applies the [Redocly minimal ruleset](https://redocly.com/docs/cli/rules/minimal) and adds a few additional [built-in rules](https://redocly.com/docs/cli/rules/built-in-rules):


```yaml 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
```

The following sample ruleset configuration is for the Silver level and applies the [Redocly minimal ruleset](https://redocly.com/docs/cli/rules/minimal), adds a few additional [built-in rules](https://redocly.com/docs/cli/rules/built-in-rules), and a few additional [configurable rules](https://redocly.com/docs/cli/configuration/rules):


```yaml api-ruleset-silver.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
```

The following sample ruleset configuration is for the Gold level:


```yaml 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
```

### Ignore example

To ignore a specific file from the scorecard calculation, for example `openapi.yaml`, use `ignore` property:


```yaml
scorecardClassic:
  ignore:
    - openapi.yaml
```

To ignore a directory, for example `catalog/`:


```yaml
scorecardClassic:
  ignore:
    - catalog/*
```

To ignore every file with a specific extension, for example `.yaml`:


```yaml
scorecardClassic:
  ignore:
    - "**/*.yaml"
```

### fromProjectUrl example

To enable the [Redocly OpenAPI VS Code extension](https://marketplace.visualstudio.com/items?itemName=Redocly.openapi-vs-code) to validate your local API descriptions against remote scorecard rules:


```yaml
scorecardClassic:
  fromProjectUrl: https://app.cloud.redocly.com/org/my-org/project/my-project
```

## Resources

- **[Lint](/docs/realm/reunite/project/lint)** - Understand the Lint deployment step, what the scorecard displays, how to access reports, and the scorecard's role in API quality management
- **[Configure classic scorecard](/docs/realm/reunite/project/configure-classic-scorecard)** - Add Redocly built-in or custom rulesets to the classic scorecard for comprehensive API quality assessment and tracking
- **[OpenAPI reference](/docs/realm/config/openapi)** - Customize the behavior and appearance of integrated API documentation for comprehensive scorecard integration
- **[Catalog reference](/docs/realm/config/catalog-classic)** - Configure a classic version of the API catalog with different customization options for effective scorecard management