- 
                Notifications
    
You must be signed in to change notification settings  - Fork 9.2k
 
Description
According to swagger schema spec (which can be found on https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md), the field "host" should be as following:
The host (name or ip) serving the API. This MUST be the host only and does not include the scheme nor sub-paths. It MAY include a port. If the host is not included, the host serving the documentation is to be used (including the port). The host does not support path templating.
According to this definition, ip_address:port_number should make a valid 'host' field. However when I tried to validate my swagger json doc against swagger json schema (which can be found on http://swagger.io/v2/schema.json), 'host' field has to follow the following format:
"host": {
  "type": "string",
  "format": "uri",
  "pattern": "^[^{}/ :\\\\]+(?::\\d+)?$",
  "description": "The fully qualified URI to the host of the API."
}
ip_address:port_number failed on this validation check. Only when I changed it to domain_address:port_number,, this validation check is passed successfully.
this has caused confusion. Please make the description in spec match with the schema