At least one server should be defined

Issue ID: v3-warning-servers-required

Description

You have not defined any servers for your API.

According to the Open API Specification (OAS), the top-level property servers is optional and if not present, the host and the port serving the API documentation are used. However, there is no host serving the documentation for the APIs in 42Crunch Platform, so Security Audit cannot infer the server.

For more details, see the OpenAPI Specification.

Example

The following is an example of how this issue could look in your API definition:

{
    "servers": {
    }
}

Remediation

Make sure that you have defined at least one server for your API.

{
    "servers": {
        "url": "https://my.api.server.com/",
        "description": "My API server"
    }
}

OAS v3 also supports defining an array of multiple servers for a single API:

{
    "servers": [
        {
            "url": "https://my.api.server1.com/",
            "description": "API server 1"
        },
        {
            "url": "https://my.api.server2.com/",
            "description": "API server 2"
        }
    ]
}