You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The APIs from the Javascript client generated seem to receive Date values in epoch millis instead of ISO-8601. However, it seems that the APIs (specifically the constructFromObject function) doesn't handle converting from epoch millis and results in 'Invalid Date'. This is happening because the long value is being converted to a string before being passed to the Date object constructor.
The solution here would be to just check if the incoming object type and if it's numeric then just pass it on to Date without wrapping it in a string first.
openapi-generator version
4.3.1
Suggest a fix
Modify this portion of the mustache file to look like this:
* master: (129 commits)
[typescript-axios] add promise to bearer and oauth tokens (#7132)
update doc
[REQ] Added enumClassPrefix option to Go server generation (#7008)
[Java][jersey2] Add helper methods for oneOf Java classes (#7115)
[Kotlin][Retrofit2] fix missing import for file (#7121)
adding handling for epoch dates in javascript ApiClient mustache file (#6497) (#6504)
update doc
comment out cpanm in travis
[Kotlin] Rxjava3 support (#6998)
[BUG][JAVA] Fix error handling in okhttp-gson async api client (#7089)
Update to reset httpRepsonse.Body (#6948)
[php-lumen] Set required PHP version to ^7.2.5 (#6949)
[contrib][docs] Assert importance of title/description/repro steps (#7103)
ISSUE-4222: Prevent conflicts with accept(s) local variables in generated Java RestTemplate ApiClient (#7101)
[bug][core] Copy all attributes (not properties) on composed schemas when flattening models (#7106)
[core] Add type and format properties to model of inline response (#6153)
[PowerShell] better publishing workflow (#7114)
[aspnetcore] Typo issues in docs and generated code (#7094)
fix http signaure auth in build.sbt (#7110)
fix for the issue facing spec invlolving arrayschema structure with ref (#6310)
...
Description
The APIs from the Javascript client generated seem to receive Date values in epoch millis instead of ISO-8601. However, it seems that the APIs (specifically the constructFromObject function) doesn't handle converting from epoch millis and results in 'Invalid Date'. This is happening because the long value is being converted to a string before being passed to the Date object constructor.
The solution here would be to just check if the incoming object type and if it's numeric then just pass it on to Date without wrapping it in a string first.
openapi-generator version
4.3.1
Suggest a fix
Modify this portion of the mustache file to look like this:
The text was updated successfully, but these errors were encountered: