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
{{ message }}
Repository navigation
--output yaml prints testDate in scientific notation #644
When running microcks test with --output yaml, testDate (and any integer >= 1,000,000) is formatted in scientific notation instead of a plain integer:
--output json: "testDate": 1795635823307
--output yaml: testDate: 1.795635868754e+12
This makes --output yaml inconsistent with --output json and awkward for scripts or CI pipelines parsing testDate as an epoch millisecond integer.
Expected behavior
--output yaml should render testDate (and other integer fields) as plain integers, matching --output json.
Actual behavior
testDate is rendered as a scientific-notation float (1.795635868754e+12).
In pkg/output/yaml_formatter.go (lines 29–43), TestResult is marshaled to JSON, unmarshaled into interface{} (which decodes JSON numbers as float64), and then passed to gopkg.in/yaml.v3 (which formats float64 values >= 1,000,000 in scientific notation). TestYAMLFormatter in pkg/output/output_test.go leaves TestDate at 0, so this wasn't caught by existing tests.
How to Reproduce?
Run a contract test with --output yaml using a sample OpenAPI spec:
Activity