Skip to content

Commit

Permalink
fix: generated models declare lists as java.util.List instead of Arr…
Browse files Browse the repository at this point in the history
…ayList (6114)

fix: generated models declare lists as java.util.List instead of ArrayList

Signed-off-by: Marc Nuri <[email protected]>
---
fix: all Lists and Maps initiated with empty maps and arrays

Signed-off-by: Marc Nuri <[email protected]>
---
fix: generated models declare lists as java.util.List instead of ArrayList (generated)

Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa authored Jul 8, 2024
1 parent a96694f commit 0c74237
Show file tree
Hide file tree
Showing 79 changed files with 598 additions and 420 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ public void setReplace(PodHttpChaosReplaceActions replace) {
}

@JsonProperty("request_headers")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, String> getRequestHeaders() {
return requestHeaders;
}
Expand All @@ -248,6 +249,7 @@ public void setRequestHeaders(Map<String, String> requestHeaders) {
}

@JsonProperty("response_headers")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, String> getResponseHeaders() {
return responseHeaders;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ public void setPort(Integer port) {
}

@JsonProperty("request_headers")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, String> getRequestHeaders() {
return requestHeaders;
}
Expand All @@ -152,6 +153,7 @@ public void setRequestHeaders(Map<String, String> requestHeaders) {
}

@JsonProperty("response_headers")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, String> getResponseHeaders() {
return responseHeaders;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public Value(IsValueKind kind) {
}

@JsonProperty("Kind")
@JsonUnwrapped
public IsValueKind getKind() {
return kind;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public EnvoyFilterEnvoyConfigObjectMatch(IsEnvoyFilterEnvoyConfigObjectMatchObje
}

@JsonProperty("ObjectTypes")
@JsonUnwrapped
public IsEnvoyFilterEnvoyConfigObjectMatchObjectTypes getObjectTypes() {
return objectTypes;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public HTTPBody(IsHTTPBodySpecifier specifier) {
}

@JsonProperty("Specifier")
@JsonUnwrapped
public IsHTTPBodySpecifier getSpecifier() {
return specifier;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public HTTPFaultInjectionAbort(IsHTTPFaultInjectionAbortErrorType errorType, Per
}

@JsonProperty("ErrorType")
@JsonUnwrapped
public IsHTTPFaultInjectionAbortErrorType getErrorType() {
return errorType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public HTTPFaultInjectionDelay(IsHTTPFaultInjectionDelayHttpDelayType httpDelayT
}

@JsonProperty("HttpDelayType")
@JsonUnwrapped
public IsHTTPFaultInjectionDelayHttpDelayType getHttpDelayType() {
return httpDelayType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public HTTPRedirect(IsHTTPRedirectRedirectPort redirectPort, String authority, I
}

@JsonProperty("RedirectPort")
@JsonUnwrapped
public IsHTTPRedirectRedirectPort getRedirectPort() {
return redirectPort;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public LoadBalancerSettings(IsLoadBalancerSettingsLbPolicy lbPolicy, LocalityLoa
}

@JsonProperty("LbPolicy")
@JsonUnwrapped
public IsLoadBalancerSettingsLbPolicy getLbPolicy() {
return lbPolicy;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public LoadBalancerSettingsConsistentHashLB(IsLoadBalancerSettingsConsistentHash
}

@JsonProperty("HashAlgorithm")
@JsonUnwrapped
public IsLoadBalancerSettingsConsistentHashLBHashAlgorithm getHashAlgorithm() {
return hashAlgorithm;
}
Expand All @@ -101,6 +102,7 @@ public void setHashAlgorithm(IsLoadBalancerSettingsConsistentHashLBHashAlgorithm
}

@JsonProperty("HashKey")
@JsonUnwrapped
public IsLoadBalancerSettingsConsistentHashLBHashKey getHashKey() {
return hashKey;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public ReadinessProbe(IsReadinessProbeHealthCheckMethod healthCheckMethod, Integ
}

@JsonProperty("HealthCheckMethod")
@JsonUnwrapped
public IsReadinessProbeHealthCheckMethod getHealthCheckMethod() {
return healthCheckMethod;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public StringMatch(IsStringMatchMatchType matchType) {
}

@JsonProperty("MatchType")
@JsonUnwrapped
public IsStringMatchMatchType getMatchType() {
return matchType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public MetricSelector(IsMetricSelectorMetricMatch metricMatch, WorkloadMode mode
}

@JsonProperty("MetricMatch")
@JsonUnwrapped
public IsMetricSelectorMetricMatch getMetricMatch() {
return metricMatch;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public TracingCustomTag(IsTracingCustomTagType type) {
}

@JsonProperty("Type")
@JsonUnwrapped
public IsTracingCustomTagType getType() {
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public HTTPBody(IsHTTPBodySpecifier specifier) {
}

@JsonProperty("Specifier")
@JsonUnwrapped
public IsHTTPBodySpecifier getSpecifier() {
return specifier;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public HTTPFaultInjectionAbort(IsHTTPFaultInjectionAbortErrorType errorType, Per
}

@JsonProperty("ErrorType")
@JsonUnwrapped
public IsHTTPFaultInjectionAbortErrorType getErrorType() {
return errorType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public HTTPFaultInjectionDelay(IsHTTPFaultInjectionDelayHttpDelayType httpDelayT
}

@JsonProperty("HttpDelayType")
@JsonUnwrapped
public IsHTTPFaultInjectionDelayHttpDelayType getHttpDelayType() {
return httpDelayType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public HTTPRedirect(IsHTTPRedirectRedirectPort redirectPort, String authority, I
}

@JsonProperty("RedirectPort")
@JsonUnwrapped
public IsHTTPRedirectRedirectPort getRedirectPort() {
return redirectPort;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public LoadBalancerSettings(IsLoadBalancerSettingsLbPolicy lbPolicy, LocalityLoa
}

@JsonProperty("LbPolicy")
@JsonUnwrapped
public IsLoadBalancerSettingsLbPolicy getLbPolicy() {
return lbPolicy;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public LoadBalancerSettingsConsistentHashLB(IsLoadBalancerSettingsConsistentHash
}

@JsonProperty("HashAlgorithm")
@JsonUnwrapped
public IsLoadBalancerSettingsConsistentHashLBHashAlgorithm getHashAlgorithm() {
return hashAlgorithm;
}
Expand All @@ -101,6 +102,7 @@ public void setHashAlgorithm(IsLoadBalancerSettingsConsistentHashLBHashAlgorithm
}

@JsonProperty("HashKey")
@JsonUnwrapped
public IsLoadBalancerSettingsConsistentHashLBHashKey getHashKey() {
return hashKey;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public ReadinessProbe(IsReadinessProbeHealthCheckMethod healthCheckMethod, Integ
}

@JsonProperty("HealthCheckMethod")
@JsonUnwrapped
public IsReadinessProbeHealthCheckMethod getHealthCheckMethod() {
return healthCheckMethod;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public StringMatch(IsStringMatchMatchType matchType) {
}

@JsonProperty("MatchType")
@JsonUnwrapped
public IsStringMatchMatchType getMatchType() {
return matchType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public AuthorizationPolicySpec(IsAuthorizationPolicyActionDetail actionDetail, A
}

@JsonProperty("ActionDetail")
@JsonUnwrapped
public IsAuthorizationPolicyActionDetail getActionDetail() {
return actionDetail;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public void setDisabled(Boolean disabled) {
}

@JsonProperty("policy-templates")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<PolicyTemplate> getPolicyTemplates() {
return policyTemplates;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public AutomationDef(Map<String, Object> extraVars, java.lang.String name, java.
}

@JsonProperty("extra_vars")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, Object> getExtraVars() {
return extraVars;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public void setDynamic(List<DynamicHop> dynamic) {
}

@JsonProperty("static")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<StaticHop> getStatic() {
return _static;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ public void setDisplayName(String displayName) {
}

@JsonProperty("finally")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<PipelineTask> getFinally() {
return _finally;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public ParamValue(List<java.lang.String> arrayVal, Map<String, String> objectVal
}

@JsonProperty("ArrayVal")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<java.lang.String> getArrayVal() {
return arrayVal;
}
Expand All @@ -106,6 +107,7 @@ public void setArrayVal(List<java.lang.String> arrayVal) {
}

@JsonProperty("ObjectVal")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, String> getObjectVal() {
return objectVal;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public void setDisplayName(String displayName) {
}

@JsonProperty("finally")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<PipelineTask> getFinally() {
return _finally;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class UserInfo implements Editable<UserInfoBuilder> , KubernetesResource

@JsonProperty("extra")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, ArrayList<String>> extra = new LinkedHashMap<>();
private Map<String, List<String>> extra = new LinkedHashMap<>();
@JsonProperty("groups")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> groups = new ArrayList<>();
Expand All @@ -79,7 +79,7 @@ public class UserInfo implements Editable<UserInfoBuilder> , KubernetesResource
public UserInfo() {
}

public UserInfo(Map<String, ArrayList<String>> extra, List<String> groups, String uid, String username) {
public UserInfo(Map<String, List<String>> extra, List<String> groups, String uid, String username) {
super();
this.extra = extra;
this.groups = groups;
Expand All @@ -89,12 +89,12 @@ public UserInfo(Map<String, ArrayList<String>> extra, List<String> groups, Strin

@JsonProperty("extra")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, ArrayList<String>> getExtra() {
public Map<String, List<String>> getExtra() {
return extra;
}

@JsonProperty("extra")
public void setExtra(Map<String, ArrayList<String>> extra) {
public void setExtra(Map<String, List<String>> extra) {
this.extra = extra;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class SubjectAccessReviewSpec implements Editable<SubjectAccessReviewSpec

@JsonProperty("extra")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, ArrayList<String>> extra = new LinkedHashMap<>();
private Map<String, List<String>> extra = new LinkedHashMap<>();
@JsonProperty("groups")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> groups = new ArrayList<>();
Expand All @@ -85,7 +85,7 @@ public class SubjectAccessReviewSpec implements Editable<SubjectAccessReviewSpec
public SubjectAccessReviewSpec() {
}

public SubjectAccessReviewSpec(Map<String, ArrayList<String>> extra, List<String> groups, NonResourceAttributes nonResourceAttributes, ResourceAttributes resourceAttributes, String uid, String user) {
public SubjectAccessReviewSpec(Map<String, List<String>> extra, List<String> groups, NonResourceAttributes nonResourceAttributes, ResourceAttributes resourceAttributes, String uid, String user) {
super();
this.extra = extra;
this.groups = groups;
Expand All @@ -97,12 +97,12 @@ public SubjectAccessReviewSpec(Map<String, ArrayList<String>> extra, List<String

@JsonProperty("extra")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, ArrayList<String>> getExtra() {
public Map<String, List<String>> getExtra() {
return extra;
}

@JsonProperty("extra")
public void setExtra(Map<String, ArrayList<String>> extra) {
public void setExtra(Map<String, List<String>> extra) {
this.extra = extra;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class SubjectAccessReviewSpec implements Editable<SubjectAccessReviewSpec

@JsonProperty("extra")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, ArrayList<String>> extra = new LinkedHashMap<>();
private Map<String, List<String>> extra = new LinkedHashMap<>();
@JsonProperty("group")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> group = new ArrayList<>();
Expand All @@ -85,7 +85,7 @@ public class SubjectAccessReviewSpec implements Editable<SubjectAccessReviewSpec
public SubjectAccessReviewSpec() {
}

public SubjectAccessReviewSpec(Map<String, ArrayList<String>> extra, List<String> group, NonResourceAttributes nonResourceAttributes, ResourceAttributes resourceAttributes, String uid, String user) {
public SubjectAccessReviewSpec(Map<String, List<String>> extra, List<String> group, NonResourceAttributes nonResourceAttributes, ResourceAttributes resourceAttributes, String uid, String user) {
super();
this.extra = extra;
this.group = group;
Expand All @@ -97,12 +97,12 @@ public SubjectAccessReviewSpec(Map<String, ArrayList<String>> extra, List<String

@JsonProperty("extra")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, ArrayList<String>> getExtra() {
public Map<String, List<String>> getExtra() {
return extra;
}

@JsonProperty("extra")
public void setExtra(Map<String, ArrayList<String>> extra) {
public void setExtra(Map<String, List<String>> extra) {
this.extra = extra;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3378,7 +3378,7 @@
"type": "string"
}
},
"existingJavaType": "java.util.Map\u003cjava.lang.String, java.util.ArrayList\u003cjava.lang.String\u003e\u003e"
"existingJavaType": "java.util.Map\u003cjava.lang.String, java.util.List\u003cjava.lang.String\u003e\u003e"
},
"groups": {
"type": "array",
Expand Down Expand Up @@ -3762,7 +3762,7 @@
"type": "string"
}
},
"existingJavaType": "java.util.Map\u003cjava.lang.String, java.util.ArrayList\u003cjava.lang.String\u003e\u003e"
"existingJavaType": "java.util.Map\u003cjava.lang.String, java.util.List\u003cjava.lang.String\u003e\u003e"
},
"groups": {
"type": "array",
Expand Down Expand Up @@ -4122,7 +4122,7 @@
"type": "string"
}
},
"existingJavaType": "java.util.Map\u003cjava.lang.String, java.util.ArrayList\u003cjava.lang.String\u003e\u003e"
"existingJavaType": "java.util.Map\u003cjava.lang.String, java.util.List\u003cjava.lang.String\u003e\u003e"
},
"group": {
"type": "array",
Expand Down
Loading

0 comments on commit 0c74237

Please sign in to comment.