I've used the petstore-expanded.json[1] in swagger samples and the endpoint value is not set in the default request. The reason for this is that the code assumes that the "basePath" contains the host name where the API is served. While this is true for the swagger 1.2 spec, in swagger 2.0 spec the "basePath" is relative to the "host" field.
If the swagger definition has a "host" field, then the endpoint should be picked from that field.
I've used the petstore-expanded.json[1] in swagger samples and the endpoint value is not set in the default request. The reason for this is that the code assumes that the "basePath" contains the host name where the API is served. While this is true for the swagger 1.2 spec, in swagger 2.0 spec the "basePath" is relative to the "host" field.
If the swagger definition has a "host" field, then the endpoint should be picked from that field.
Thanks, Janaka
[1] https://raw.githubusercontent.com/swagger-api/swagger-spec/master/examples/v2.0/json/petstore-expanded.json