getNativeDataType() in packages/nango-yaml/lib/helpers.ts uses parseInt(value, 10), which reads the leading digits of any string. So a model like:
models:
Report:
period: 7d | 30d | 90d
factor: 2fa
is parsed as period: 7 | 30 | 90 and factor: 2, and the generated models.ts types the fields as numbers. 1.5 is also cut to 1. Only a whole numeric token should become a number literal.
Suggested fix (regex check + 2 unit tests): breken-ai/nango@master...fix/yaml-numeric-prefix-literals
getNativeDataType()inpackages/nango-yaml/lib/helpers.tsusesparseInt(value, 10), which reads the leading digits of any string. So a model like:is parsed as
period: 7 | 30 | 90andfactor: 2, and the generatedmodels.tstypes the fields as numbers.1.5is also cut to1. Only a whole numeric token should become a number literal.Suggested fix (regex check + 2 unit tests): breken-ai/nango@master...fix/yaml-numeric-prefix-literals