gosnappi - replacement of existing Go SDK #139
Unanswered
ashutshkumr
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently we generate Go SDK from Open Traffic Generator API using oapi-codegen.
So far multiple problems have been identified with generated code.
Optional fields are generated as a pointer. This makes constructing config very inconvenient. e.g.
No code is generated for enum types. This results in user providing strings as enum values which isn't type checked at all.
It is also not very straight-forward to have enums with string values in Go (language limitation).
No way to create structs with default fields
Since most nested fields are pointers, logging any struct is not straight-forward at all. Most often you'll see output like this.
Types only map to
int
(and notuint
)Handling API calls require elaborate steps
No client-side validations - good to have
No helpers for loading from JSON config (standard support for serdes)
Generated code is not
go get
able.@ajbalogh @ankur-sheth
Beta Was this translation helpful? Give feedback.
All reactions