The top-level ‘External Documentation’ URL must be a proper URL

Description

The URL defined the url field of the top-level External Documentation object is not a proper URL.

You can use the externalDocs field to reference an external resource that offers extended documentation for your API. This is field is optional. However, if you do reference external documentation for your API, 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 OAS v2 or OAS v3.

Example

The following is an example of how this issue could look in your API definition. Here, the url field has just a placeholder string:

  "externalDocs" : {
       "description": "Additional documentation",
       "url": "need to add later"
  }

Remediation

Make sure that all URLs in your API are proper URLs and have a valid format.

  "externalDocs" : {
       "description": "Additional documentation",
       "url": "http://my.api.com/docs/"
  }

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy