When working with https basepath defined as http, it takes from the page api-docs / resources.json. The script swagger_model.py following lines:
base_url = resource_listing.get ( 'basePath')
166 line
I added
if re.search ( "https", resources_url):
base_url = re.sub ( "http", "https", base_url)
then it began to work correctly.