The time entry detailed report totals section doesn't match the OpenAPI specification

I’m trying to build a tool to export the time entries from Clockify. The tool is in python. I used the OpenAPI specification to generate the client. The specifications are coming from the same source than the web documentation using this command:

curl ‘https://docs.developer.clockify.me/openapi.json’ > ./docs/openapi.json

The generator is the official one here (GitHub - OpenAPITools/openapi-generator: OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)).

Most functions are working correctly except the call to /v1/workspaces/{workspace_id}/reports/detailed. The response is correctly received but the deserialization failed due to a mismatch between the specification and the JSON answer.

The error:

File “clockify_client/models/time_entry_detailed_report_dto.py”, line 93, in from_dict
“totals”: TimeEntryDetailedReportDtoTotals.from_dict(obj[“totals”]) if obj.get(“totals”) is not None else None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “clockify_client/models/time_entry_detailed_report_dto_totals.py”, line 92, in from_dict
return cls.model_validate(obj)
^^^^^^^^^^^^^^^^^^^^^^^
File “/lib/python3.12/site-packages/pydantic/main.py”, line 596, in model_validate
return cls.pydantic_validator.validate_python(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for TimeEntryDetailedReportDtoTotals
Input should be a valid dictionary or instance of TimeEntryDetailedReportDtoTotals [type=model_type, input_value=[{‘totalTime’: 1376040, ‘…’: 366166.6666666667}]}], input_type=list]
For further information visit Redirecting...

Is there a way to fix that issue?

Hi jpbluteau,

Development team will take a look into this and we’ll let you know.