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
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The current JavaScript and TypeScript generators use substr to get the date part (YYYY-MM-DD) from a full ISO-8601 date string, substr is deprecated and there is a substring function that is supported and that should be used instead.
Using deprecated functions might blocked by your build system.
Bug Report Checklist
Description
The current JavaScript and TypeScript generators use
substr
to get the date part (YYYY-MM-DD) from a full ISO-8601 date string,substr
is deprecated and there is asubstring
function that is supported and that should be used instead.Using deprecated functions might blocked by your build system.
Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr
openapi-generator version
Tested 6.6.0 and Master - Not a regression
Steps to reproduce
Generate any spec file containing a
date
field, the code generated is:Related issues/PRs
Found no issue or PR mentioning this
Suggest a fix
Draft PR: #15937
The text was updated successfully, but these errors were encountered: