At least one host should be defined

Issue ID: warning-host-undefined

Description

You have not defined any hosts in your API definition.

According to the Open API Specification (OAS), the top-level property host 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 API Security Audit cannot infer the host.

For more details, see the OpenAPI Specification.

Example

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

{
    "swagger": "2.0",
    "info": {
        "description": "My example API",
        "version": "1.0.0",
        "title": "My API"
    },
    "paths": {
    // ...
    }
}

Remediation

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

{
    "swagger": "2.0",
    "info": {
        "description": "My example API",
        "version": "1.0.0",
        "title": "My API"
    },
    "host": "my.api.com:8090",
    "paths": {
    // ...
    }
}