Timestamp type causes "expected ';', found '{'" syntax error in generated types #5189
Labels
bug
Issues reporting bugs.
language/go
product/sdk-generator
Fern's SDK Generator that outputs client libraries in 7 languages
CLI Version
0.45.0-rc44
- the absolute most bleeding-edge version of the CLIGenerator Version
0.23.5
- observed infern-go-fiber
andfern-go-model
Describe the Bug
When defining an API spec with a timestamp type on an undiscriminated union, I observed the latest version of the generator for
fern-go-fiber
(andfern-go-model
in testing) acting up on the Go source code it generated:Additional Context
After doing some magic to get local development working again, I did a deep dive:
generator/go
with somefmt.Errorf
wraps to drill down to the generated source (where this error is emitted, ingenerators/go/internal/generator/file_writer.go
)VisitUndiscriminatedUnion
...I made the needed changes to fix this on a fork, will make a PR shortly stemming from this issue! I will leave the improved error / generated source logging changes as a separate commit to let them be cherry-picked out.
The text was updated successfully, but these errors were encountered: