Skip to content

Commit

Permalink
fix(openapi): don't generate field names with snake case
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <marc@marcnuri.com>
  • Loading branch information
manusa authored Nov 22, 2024
1 parent b53f691 commit ba99b72
Show file tree
Hide file tree
Showing 30 changed files with 397 additions and 382 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public class ExpInfo implements Editable<ExpInfoBuilder> , KubernetesResource
@JsonProperty("stress-mem")
private StressMemorySpec stressMem;
@JsonProperty("user_defined")
private UserDefinedSpec user_defined;
private UserDefinedSpec userDefined;
@JsonProperty("vm")
private VMSpec vm;
@JsonIgnore
Expand All @@ -200,7 +200,7 @@ public class ExpInfo implements Editable<ExpInfoBuilder> , KubernetesResource
public ExpInfo() {
}

public ExpInfo(ClockSpec clock, DiskFillSpec diskFill, DiskPayloadSpec diskReadPayload, DiskPayloadSpec diskWritePayload, FileAppendSpec fileAppend, FileCreateSpec fileCreate, FileDeleteSpec fileDelete, FileModifyPrivilegeSpec fileModify, FileRenameSpec fileRename, FileReplaceSpec fileReplace, HTTPAbortSpec httpAbort, HTTPConfigSpec httpConfig, HTTPDelaySpec httpDelay, HTTPRequestSpec httpRequest, JVMExceptionSpec jvmException, JVMGCSpec jvmGc, JVMLatencySpec jvmLatency, PMJVMMySQLSpec jvmMysql, JVMReturnSpec jvmReturn, JVMRuleDataSpec jvmRuleData, JVMStressSpec jvmStress, KafkaFillSpec kafkaFill, KafkaFloodSpec kafkaFlood, KafkaIOSpec kafkaIo, NetworkBandwidthSpec networkBandwidth, NetworkCorruptSpec networkCorrupt, NetworkDelaySpec networkDelay, NetworkDNSSpec networkDns, NetworkDownSpec networkDown, NetworkDuplicateSpec networkDuplicate, NetworkFloodSpec networkFlood, NetworkLossSpec networkLoss, NetworkPartitionSpec networkPartition, ProcessSpec process, RedisCacheLimitSpec redisCacheLimit, RedisExpirationSpec redisExpiration, RedisPenetrationSpec redisPenetration, RedisSentinelRestartSpec redisRestart, RedisSentinelStopSpec redisStop, StressCPUSpec stressCpu, StressMemorySpec stressMem, UserDefinedSpec user_defined, VMSpec vm) {
public ExpInfo(ClockSpec clock, DiskFillSpec diskFill, DiskPayloadSpec diskReadPayload, DiskPayloadSpec diskWritePayload, FileAppendSpec fileAppend, FileCreateSpec fileCreate, FileDeleteSpec fileDelete, FileModifyPrivilegeSpec fileModify, FileRenameSpec fileRename, FileReplaceSpec fileReplace, HTTPAbortSpec httpAbort, HTTPConfigSpec httpConfig, HTTPDelaySpec httpDelay, HTTPRequestSpec httpRequest, JVMExceptionSpec jvmException, JVMGCSpec jvmGc, JVMLatencySpec jvmLatency, PMJVMMySQLSpec jvmMysql, JVMReturnSpec jvmReturn, JVMRuleDataSpec jvmRuleData, JVMStressSpec jvmStress, KafkaFillSpec kafkaFill, KafkaFloodSpec kafkaFlood, KafkaIOSpec kafkaIo, NetworkBandwidthSpec networkBandwidth, NetworkCorruptSpec networkCorrupt, NetworkDelaySpec networkDelay, NetworkDNSSpec networkDns, NetworkDownSpec networkDown, NetworkDuplicateSpec networkDuplicate, NetworkFloodSpec networkFlood, NetworkLossSpec networkLoss, NetworkPartitionSpec networkPartition, ProcessSpec process, RedisCacheLimitSpec redisCacheLimit, RedisExpirationSpec redisExpiration, RedisPenetrationSpec redisPenetration, RedisSentinelRestartSpec redisRestart, RedisSentinelStopSpec redisStop, StressCPUSpec stressCpu, StressMemorySpec stressMem, UserDefinedSpec userDefined, VMSpec vm) {
super();
this.clock = clock;
this.diskFill = diskFill;
Expand Down Expand Up @@ -243,7 +243,7 @@ public ExpInfo(ClockSpec clock, DiskFillSpec diskFill, DiskPayloadSpec diskReadP
this.redisStop = redisStop;
this.stressCpu = stressCpu;
this.stressMem = stressMem;
this.user_defined = user_defined;
this.userDefined = userDefined;
this.vm = vm;
}

Expand Down Expand Up @@ -658,13 +658,13 @@ public void setStressMem(StressMemorySpec stressMem) {
}

@JsonProperty("user_defined")
public UserDefinedSpec getUser_defined() {
return user_defined;
public UserDefinedSpec getUserDefined() {
return userDefined;
}

@JsonProperty("user_defined")
public void setUser_defined(UserDefinedSpec user_defined) {
this.user_defined = user_defined;
public void setUserDefined(UserDefinedSpec userDefined) {
this.userDefined = userDefined;
}

@JsonProperty("vm")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class HTTPAbortSpec implements Editable<HTTPAbortSpecBuilder> , Kubernete
private Integer port;
@JsonProperty("proxy_ports")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<Integer> proxy_ports = new ArrayList<>();
private List<Integer> proxyPorts = new ArrayList<>();
@JsonProperty("target")
private String target;
@JsonIgnore
Expand All @@ -92,13 +92,13 @@ public class HTTPAbortSpec implements Editable<HTTPAbortSpecBuilder> , Kubernete
public HTTPAbortSpec() {
}

public HTTPAbortSpec(String code, String method, String path, Integer port, List<Integer> proxy_ports, String target) {
public HTTPAbortSpec(String code, String method, String path, Integer port, List<Integer> proxyPorts, String target) {
super();
this.code = code;
this.method = method;
this.path = path;
this.port = port;
this.proxy_ports = proxy_ports;
this.proxyPorts = proxyPorts;
this.target = target;
}

Expand Down Expand Up @@ -144,13 +144,13 @@ public void setPort(Integer port) {

@JsonProperty("proxy_ports")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<Integer> getProxy_ports() {
return proxy_ports;
public List<Integer> getProxyPorts() {
return proxyPorts;
}

@JsonProperty("proxy_ports")
public void setProxy_ports(List<Integer> proxy_ports) {
this.proxy_ports = proxy_ports;
public void setProxyPorts(List<Integer> proxyPorts) {
this.proxyPorts = proxyPorts;
}

@JsonProperty("target")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ public class HTTPChaosSpec implements Editable<HTTPChaosSpecBuilder> , Kubernete
private PodHttpChaosReplaceActions replace;
@JsonProperty("request_headers")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, String> request_headers = new LinkedHashMap<>();
private Map<String, String> requestHeaders = new LinkedHashMap<>();
@JsonProperty("response_headers")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Map<String, String> response_headers = new LinkedHashMap<>();
private Map<String, String> responseHeaders = new LinkedHashMap<>();
@JsonProperty("selector")
private PodSelectorSpec selector;
@JsonProperty("target")
Expand All @@ -124,7 +124,7 @@ public class HTTPChaosSpec implements Editable<HTTPChaosSpecBuilder> , Kubernete
public HTTPChaosSpec() {
}

public HTTPChaosSpec(Boolean abort, Integer code, String delay, String duration, String method, String mode, PodHttpChaosPatchActions patch, String path, Integer port, String remoteCluster, PodHttpChaosReplaceActions replace, Map<String, String> request_headers, Map<String, String> response_headers, PodSelectorSpec selector, String target, PodHttpChaosTLS tls, String value) {
public HTTPChaosSpec(Boolean abort, Integer code, String delay, String duration, String method, String mode, PodHttpChaosPatchActions patch, String path, Integer port, String remoteCluster, PodHttpChaosReplaceActions replace, Map<String, String> requestHeaders, Map<String, String> responseHeaders, PodSelectorSpec selector, String target, PodHttpChaosTLS tls, String value) {
super();
this.abort = abort;
this.code = code;
Expand All @@ -137,8 +137,8 @@ public HTTPChaosSpec(Boolean abort, Integer code, String delay, String duration,
this.port = port;
this.remoteCluster = remoteCluster;
this.replace = replace;
this.request_headers = request_headers;
this.response_headers = response_headers;
this.requestHeaders = requestHeaders;
this.responseHeaders = responseHeaders;
this.selector = selector;
this.target = target;
this.tls = tls;
Expand Down Expand Up @@ -257,24 +257,24 @@ public void setReplace(PodHttpChaosReplaceActions replace) {

@JsonProperty("request_headers")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, String> getRequest_headers() {
return request_headers;
public Map<String, String> getRequestHeaders() {
return requestHeaders;
}

@JsonProperty("request_headers")
public void setRequest_headers(Map<String, String> request_headers) {
this.request_headers = request_headers;
public void setRequestHeaders(Map<String, String> requestHeaders) {
this.requestHeaders = requestHeaders;
}

@JsonProperty("response_headers")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public Map<String, String> getResponse_headers() {
return response_headers;
public Map<String, String> getResponseHeaders() {
return responseHeaders;
}

@JsonProperty("response_headers")
public void setResponse_headers(Map<String, String> response_headers) {
this.response_headers = response_headers;
public void setResponseHeaders(Map<String, String> responseHeaders) {
this.responseHeaders = responseHeaders;
}

@JsonProperty("selector")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class HTTPCommonSpec implements Editable<HTTPCommonSpecBuilder> , Kuberne
private Integer port;
@JsonProperty("proxy_ports")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<Integer> proxy_ports = new ArrayList<>();
private List<Integer> proxyPorts = new ArrayList<>();
@JsonProperty("target")
private String target;
@JsonIgnore
Expand All @@ -92,13 +92,13 @@ public class HTTPCommonSpec implements Editable<HTTPCommonSpecBuilder> , Kuberne
public HTTPCommonSpec() {
}

public HTTPCommonSpec(String code, String method, String path, Integer port, List<Integer> proxy_ports, String target) {
public HTTPCommonSpec(String code, String method, String path, Integer port, List<Integer> proxyPorts, String target) {
super();
this.code = code;
this.method = method;
this.path = path;
this.port = port;
this.proxy_ports = proxy_ports;
this.proxyPorts = proxyPorts;
this.target = target;
}

Expand Down Expand Up @@ -144,13 +144,13 @@ public void setPort(Integer port) {

@JsonProperty("proxy_ports")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<Integer> getProxy_ports() {
return proxy_ports;
public List<Integer> getProxyPorts() {
return proxyPorts;
}

@JsonProperty("proxy_ports")
public void setProxy_ports(List<Integer> proxy_ports) {
this.proxy_ports = proxy_ports;
public void setProxyPorts(List<Integer> proxyPorts) {
this.proxyPorts = proxyPorts;
}

@JsonProperty("target")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class HTTPConfigSpec implements Editable<HTTPConfigSpecBuilder> , Kuberne
{

@JsonProperty("file_path")
private String file_path;
private String filePath;
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

Expand All @@ -74,19 +74,19 @@ public class HTTPConfigSpec implements Editable<HTTPConfigSpecBuilder> , Kuberne
public HTTPConfigSpec() {
}

public HTTPConfigSpec(String file_path) {
public HTTPConfigSpec(String filePath) {
super();
this.file_path = file_path;
this.filePath = filePath;
}

@JsonProperty("file_path")
public String getFile_path() {
return file_path;
public String getFilePath() {
return filePath;
}

@JsonProperty("file_path")
public void setFile_path(String file_path) {
this.file_path = file_path;
public void setFilePath(String filePath) {
this.filePath = filePath;
}

@JsonIgnore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public class HTTPDelaySpec implements Editable<HTTPDelaySpecBuilder> , Kubernete
private Integer port;
@JsonProperty("proxy_ports")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<Integer> proxy_ports = new ArrayList<>();
private List<Integer> proxyPorts = new ArrayList<>();
@JsonProperty("target")
private String target;
@JsonIgnore
Expand All @@ -95,14 +95,14 @@ public class HTTPDelaySpec implements Editable<HTTPDelaySpecBuilder> , Kubernete
public HTTPDelaySpec() {
}

public HTTPDelaySpec(String code, String delay, String method, String path, Integer port, List<Integer> proxy_ports, String target) {
public HTTPDelaySpec(String code, String delay, String method, String path, Integer port, List<Integer> proxyPorts, String target) {
super();
this.code = code;
this.delay = delay;
this.method = method;
this.path = path;
this.port = port;
this.proxy_ports = proxy_ports;
this.proxyPorts = proxyPorts;
this.target = target;
}

Expand Down Expand Up @@ -158,13 +158,13 @@ public void setPort(Integer port) {

@JsonProperty("proxy_ports")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<Integer> getProxy_ports() {
return proxy_ports;
public List<Integer> getProxyPorts() {
return proxyPorts;
}

@JsonProperty("proxy_ports")
public void setProxy_ports(List<Integer> proxy_ports) {
this.proxy_ports = proxy_ports;
public void setProxyPorts(List<Integer> proxyPorts) {
this.proxyPorts = proxyPorts;
}

@JsonProperty("target")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public class PhysicalMachineChaosSpec implements Editable<PhysicalMachineChaosSp
@JsonProperty("stress-mem")
private StressMemorySpec stressMem;
@JsonProperty("user_defined")
private UserDefinedSpec user_defined;
private UserDefinedSpec userDefined;
@JsonProperty("value")
private String value;
@JsonProperty("vm")
Expand All @@ -224,7 +224,7 @@ public class PhysicalMachineChaosSpec implements Editable<PhysicalMachineChaosSp
public PhysicalMachineChaosSpec() {
}

public PhysicalMachineChaosSpec(String action, List<String> address, ClockSpec clock, DiskFillSpec diskFill, DiskPayloadSpec diskReadPayload, DiskPayloadSpec diskWritePayload, String duration, FileAppendSpec fileAppend, FileCreateSpec fileCreate, FileDeleteSpec fileDelete, FileModifyPrivilegeSpec fileModify, FileRenameSpec fileRename, FileReplaceSpec fileReplace, HTTPAbortSpec httpAbort, HTTPConfigSpec httpConfig, HTTPDelaySpec httpDelay, HTTPRequestSpec httpRequest, JVMExceptionSpec jvmException, JVMGCSpec jvmGc, JVMLatencySpec jvmLatency, PMJVMMySQLSpec jvmMysql, JVMReturnSpec jvmReturn, JVMRuleDataSpec jvmRuleData, JVMStressSpec jvmStress, KafkaFillSpec kafkaFill, KafkaFloodSpec kafkaFlood, KafkaIOSpec kafkaIo, String mode, NetworkBandwidthSpec networkBandwidth, NetworkCorruptSpec networkCorrupt, NetworkDelaySpec networkDelay, NetworkDNSSpec networkDns, NetworkDownSpec networkDown, NetworkDuplicateSpec networkDuplicate, NetworkFloodSpec networkFlood, NetworkLossSpec networkLoss, NetworkPartitionSpec networkPartition, ProcessSpec process, RedisCacheLimitSpec redisCacheLimit, RedisExpirationSpec redisExpiration, RedisPenetrationSpec redisPenetration, RedisSentinelRestartSpec redisRestart, RedisSentinelStopSpec redisStop, String remoteCluster, PhysicalMachineSelectorSpec selector, StressCPUSpec stressCpu, StressMemorySpec stressMem, UserDefinedSpec user_defined, String value, VMSpec vm) {
public PhysicalMachineChaosSpec(String action, List<String> address, ClockSpec clock, DiskFillSpec diskFill, DiskPayloadSpec diskReadPayload, DiskPayloadSpec diskWritePayload, String duration, FileAppendSpec fileAppend, FileCreateSpec fileCreate, FileDeleteSpec fileDelete, FileModifyPrivilegeSpec fileModify, FileRenameSpec fileRename, FileReplaceSpec fileReplace, HTTPAbortSpec httpAbort, HTTPConfigSpec httpConfig, HTTPDelaySpec httpDelay, HTTPRequestSpec httpRequest, JVMExceptionSpec jvmException, JVMGCSpec jvmGc, JVMLatencySpec jvmLatency, PMJVMMySQLSpec jvmMysql, JVMReturnSpec jvmReturn, JVMRuleDataSpec jvmRuleData, JVMStressSpec jvmStress, KafkaFillSpec kafkaFill, KafkaFloodSpec kafkaFlood, KafkaIOSpec kafkaIo, String mode, NetworkBandwidthSpec networkBandwidth, NetworkCorruptSpec networkCorrupt, NetworkDelaySpec networkDelay, NetworkDNSSpec networkDns, NetworkDownSpec networkDown, NetworkDuplicateSpec networkDuplicate, NetworkFloodSpec networkFlood, NetworkLossSpec networkLoss, NetworkPartitionSpec networkPartition, ProcessSpec process, RedisCacheLimitSpec redisCacheLimit, RedisExpirationSpec redisExpiration, RedisPenetrationSpec redisPenetration, RedisSentinelRestartSpec redisRestart, RedisSentinelStopSpec redisStop, String remoteCluster, PhysicalMachineSelectorSpec selector, StressCPUSpec stressCpu, StressMemorySpec stressMem, UserDefinedSpec userDefined, String value, VMSpec vm) {
super();
this.action = action;
this.address = address;
Expand Down Expand Up @@ -273,7 +273,7 @@ public PhysicalMachineChaosSpec(String action, List<String> address, ClockSpec c
this.selector = selector;
this.stressCpu = stressCpu;
this.stressMem = stressMem;
this.user_defined = user_defined;
this.userDefined = userDefined;
this.value = value;
this.vm = vm;
}
Expand Down Expand Up @@ -750,13 +750,13 @@ public void setStressMem(StressMemorySpec stressMem) {
}

@JsonProperty("user_defined")
public UserDefinedSpec getUser_defined() {
return user_defined;
public UserDefinedSpec getUserDefined() {
return userDefined;
}

@JsonProperty("user_defined")
public void setUser_defined(UserDefinedSpec user_defined) {
this.user_defined = user_defined;
public void setUserDefined(UserDefinedSpec userDefined) {
this.userDefined = userDefined;
}

@JsonProperty("value")
Expand Down
Loading

0 comments on commit ba99b72

Please sign in to comment.