License object URL is not a proper URL
Issue ID: v3-warning-license-url
Description
The URL defined in the url
field of the license
object is not a proper URL.
The license
object itself and the url
field in it are optional. If you do not defined either, your OpenAPI definition is still a valid contract. However, if you do reference your license location, the OpenAPI Specification (OAS) requires that all URLs in the API contract must be proper URLs in a valid format.
For more details, see the OpenAPI Specification
Example
The following is an example of how this issue could look in your API definition. In this case, the URL is missing the protocol prefix and has an extra space:
{
"license" : {
"name": "Apache 2.0",
"url": "www.apache.org/licenses/ LICENSE-2.0.html"
}
}
Remediation
Make sure that all URLs in your API are proper URLs and have a valid format.
{
"license" : {
"name": "Apache 2.0",
"url": "www.apache.org/licenses/LICENSE-2.0.html"
}
}