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
The golang generator for extensions used to map Golang model to Java model does not work properly when the Golang model contains consts (or enums). For example, given the Golang model:
Golang type PeerAuthentication_MutualTLS that uses a const:
typePeerAuthentication_MutualTLS_Modeint32typePeerAuthentication_MutualTLSstruct {
// Defines the mTLS mode used for peer authentication.ModePeerAuthentication_MutualTLS_Mode`protobuf:"varint,1,opt,name=mode,proto3,enum=istio.security.v1beta1.PeerAuthentication_MutualTLS_Mode" json:"mode,omitempty"`
}
Where the const is:
typePeerAuthentication_MutualTLS_Modeint32const (
// Inherit from parent, if has one. Otherwise treated as PERMISSIVE.PeerAuthentication_MutualTLS_UNSETPeerAuthentication_MutualTLS_Mode=0// Connection is not tunneled.PeerAuthentication_MutualTLS_DISABLEPeerAuthentication_MutualTLS_Mode=1// Connection can be either plaintext or mTLS tunnel.PeerAuthentication_MutualTLS_PERMISSIVEPeerAuthentication_MutualTLS_Mode=2// Connection is an mTLS tunnel (TLS with client cert must be presented).PeerAuthentication_MutualTLS_STRICTPeerAuthentication_MutualTLS_Mode=3
)
The resulting Java model contains:
// ...
public class PeerAuthentication_MutualTLS implements KubernetesResource
{
@JsonProperty("mode")
private Integer mode;
// ...
}
And the expected output should be:
// ...
public class PeerAuthentication_MutualTLS implements KubernetesResource
{
@JsonProperty("mode")
private PeerAuthentication_MutualTLS_Mode mode;
// ...
}
publicenumPeerAuthentication_MutualTLS_Mode {
// Inherit from parent, if has one. Otherwise treated as PERMISSIVE.UNSET,
// Connection is not tunneled.DISABLE,
// Connection can be either plaintext or mTLS tunnel.PERMISSIVE,
// Connection is an mTLS tunnel (TLS with client cert must be presented).STRICT;
}
The text was updated successfully, but these errors were encountered:
The golang generator for extensions used to map Golang model to Java model does not work properly when the Golang model contains consts (or enums). For example, given the Golang model:
Golang type
PeerAuthentication_MutualTLS
that uses a const:Where the const is:
The resulting Java model contains:
And the expected output should be:
The text was updated successfully, but these errors were encountered: