Strava REST API | swagger-client does not return full DetailedAthelete reperesentation

Solution for Strava REST API | swagger-client does not return full DetailedAthelete reperesentation
is Given Below:

I’m trying to build application around Strava.com REST API using swagger-client. I’ve successfully got access token and run API calls. What makes a problem is a API call getLoggedInAthlete which (according to documentation) is supposed to return an instance of DetailedAthlete while it only contains limited set of fileds (8 vs 32 expected). If I run same API call via Postman/curl I get the full representation including all fields.

I need to get full representation of DetailedAthlete including all fields (i.e. id, firstname, lastname etc) – appreciate any ideas.

Steps to reproduce:

  • Per their documentation I’ve installed [email protected] via brew.
  • Generated client: swagger-codegen generate -i https://developers.strava.com/swagger/swagger.json -l python -o generated/python
  • Installed client: cd generated/python && python setup.py install && cd ../..
  • Call API to retrieve logged athlete (I already have authorization token with read_all scope that is required to get DetailedAthlete representation).
import swagger_client
from swagger_client.rest import ApiException


def get_athl():

    configuration = swagger_client.Configuration()
    configuration.access_token = <my token here>

    api_instance = swagger_client.AthletesApi(swagger_client.ApiClient(configuration))

    try:
        r = api_instance.get_logged_in_athlete()
    except ApiException as e:
        print(e)

    return r

I receive an instance of DetailedAthlete which only includes fields of DetailedAthlete but not of SummaryAthlete. In contrast to POST request to https://www.strava.com/api/v3/athlete which returns full representation. Here for comparison what I get form swagger-client vs curl request:
swagger-client vs curl