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
Describe the bug
Please refer to the models PR: open-traffic-generator/models#421 where two new apis (append_config, delete_config) are added both of which have an array at top level of the api. With this the generated go-snappi code does not have any accessor to the underlying objects (array-items). Snippet as mentioned below,
type ConfigAppend interface {
Validation
// msg marshals ConfigAppend to protobuf object *otg.ConfigAppend
// and doesn't set defaults
msg() *otg.ConfigAppend
// setMsg unmarshals ConfigAppend from protobuf object *otg.ConfigAppend
// and doesn't set defaults
setMsg(*otg.ConfigAppend) ConfigAppend
// provides marshal interface
Marshal() marshalConfigAppend
// provides unmarshal interface
Unmarshal() unMarshalConfigAppend
// validate validates ConfigAppend
validate() error
// A stringer function
String() string
// Clones the object
Clone() (ConfigAppend, error)
validateToAndFrom() error
validateObj(vObj *validation, set_default bool)
setDefault()
}
The only way to get around this is to have an object at the top level of api and push the array under it.
But that creates an additional (and likely unnecessary) redirection to the intermediate object before an item could be added to the array. This applies to both the mentioned apis in discussion.
To Reproduce
Get the generated go-snappi from the branch in mentioned models PR.
Expected behavior
The accessor(s) to the underlying array-items should be available without the inclusion of intermediate object.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Version information
openapiart==0.3.24
Describe the bug
Please refer to the models PR: open-traffic-generator/models#421 where two new apis (append_config, delete_config) are added both of which have an array at top level of the api. With this the generated go-snappi code does not have any accessor to the underlying objects (array-items). Snippet as mentioned below,
The only way to get around this is to have an object at the top level of api and push the array under it.
But that creates an additional (and likely unnecessary) redirection to the intermediate object before an item could be added to the array. This applies to both the mentioned apis in discussion.
To Reproduce
Get the generated go-snappi from the branch in mentioned models PR.
Expected behavior
The accessor(s) to the underlying array-items should be available without the inclusion of intermediate object.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: