oci-go-sdk icon indicating copy to clipboard operation
oci-go-sdk copied to clipboard

Identity domain structs missing json `omitempty` parameter

Open F21 opened this issue 2 years ago • 0 comments

This issue relates to https://github.com/oracle/terraform-provider-oci/issues/1812

The structs in the identitydomains where mandatory:"false" are missing the json:"omitempty" tag. As an example here is a non-exhaustive list of structs where the omitempt tag is missing:

  • https://github.com/oracle/oci-go-sdk/blob/master/identitydomains/user_name.go#L54
  • https://github.com/oracle/oci-go-sdk/blob/master/identitydomains/user_groups.go#L45

This results in those fields being sent to the server as an empty string and since the server expects them to have a minimum length of 1, the operation fails.

F21 avatar Mar 16 '23 02:03 F21