The ‘External Documentation’ object URL for the operation must be a proper URL

Description

The URL defined in the url field of the External Documentation object for the API operation in question is not a proper URL.

You can use the externalDocs field to reference an external resource that offers extended documentation for an API operation. This is field is optional. However, if you do reference external documentation for your operations, OpenAPI Specification (OAS) requires that all URLs in the API contract must be proper URLs in a valid format.

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 a space in the middle:

"paths": {
  "/pets": {
    "get": {
      "description": "Returns all pets from the system that the user has access to",
      "produces": [
        "application/json"
      ],
      "externalDocs" : { 
          "description": "Find more info here",
          "url": "will add later"
      },

Remediation

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

"paths": {
  "/pets": {
    "get": {
      "description": "Returns all pets from the system that the user has access to",
      "produces": [
        "application/json"
      ],
      "externalDocs" : { 
          "description": "Find more info here",
          "url": "http://swagger.io/docs/pets"
      },

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy