Default value for the parameter is not consistent with the parameter's type
Issue ID: semantic-parameter-default-invalid
Description
The default value you have defined for a parameter is not consistent with the type of the parameter.
For more details, see the OpenAPI Specification.
Example
The following is an example of how this issue could look in your API definition. The parameter type is set to integer
, but the default value is a string:
{
"parameters": {
"type": "integer",
"format": "int32",
"default": "0",
"description": "The total number of results."
// ...
}
}
Remediation
Make sure that all default values for parameters match the parameter type.
{
"parameters": {
"type": "integer",
"format": "int32",
"default": 0,
"description": "The total number of results."
// ...
}
}