Default value for the array item is not consistent with the item's type

Issue ID: semantic-item-default-invalid

Description

The default value you have defined for an array item is not consistent with the type of the item.

For more details, see the OpenAPI Specification.

Example

The following is an example of how this issue could look in your API definition. The property count only accepts integer values, but the default value is a string:

{         
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "count": {
                "type": "integer",
                "format": "int32",
                "default": "0"
                // ...
            }
        }
    }
}

Remediation

Make sure that all default values for array items match the array items' type.

{         
    "type": "array",
    "items": {
        "type": "object",
        "properties": {
            "count": {
                "type": "integer",
                "format": "int32",
                "default": 0
                // ...
            }
        }
    }
}