diff --git a/src/main/java/com/eactive/httpmockserver/ApiInfo.java b/src/main/java/com/eactive/httpmockserver/ApiInfo.java index 46e5474..adc8cb3 100644 --- a/src/main/java/com/eactive/httpmockserver/ApiInfo.java +++ b/src/main/java/com/eactive/httpmockserver/ApiInfo.java @@ -54,9 +54,15 @@ public class ApiInfo implements Serializable { @Positive private Integer sleepSeconds; + @Column(length = 50) + private String syntaxResponseBody1; + @Column(length = 5000) private String responseBody1; + @Column(length = 50) + private String syntaxResponseBody2; + @Column(length = 5000) private String responseBody2; @@ -156,12 +162,39 @@ public class ApiInfo implements Serializable { this.responseBody2 = responseBody2; } + public String getSyntaxResponseBody1() { + return syntaxResponseBody1; + } + + public void setSyntaxResponseBody1(String syntaxResponseBody1) { + this.syntaxResponseBody1 = syntaxResponseBody1; + } + + public String getSyntaxResponseBody2() { + return syntaxResponseBody2; + } + + public void setSyntaxResponseBody2(String syntaxResponseBody2) { + this.syntaxResponseBody2 = syntaxResponseBody2; + } + @Override public String toString() { - return "ApiInfo [id=" + id + ", apiGroupName=" + apiGroupName + ", apiName=" + apiName + ", url=" + url - + ", serviceValue=" + serviceValue + ", method=" + method + ", responseContentType=" - + responseContentType + ", responseHeaders=" + responseHeaders + ", responseStatusCode=" - + responseStatusCode + ", sleepSeconds=" + sleepSeconds + ", responseBody1=" + responseBody1 - + ", responseBody2=" + responseBody2 + "]"; + return "ApiInfo{" + + "id=" + id + + ", apiGroupName='" + apiGroupName + '\'' + + ", apiName='" + apiName + '\'' + + ", url='" + url + '\'' + + ", serviceValue='" + serviceValue + '\'' + + ", method='" + method + '\'' + + ", responseContentType='" + responseContentType + '\'' + + ", responseHeaders='" + responseHeaders + '\'' + + ", responseStatusCode=" + responseStatusCode + + ", sleepSeconds=" + sleepSeconds + + ", syntaxResponseBody1='" + syntaxResponseBody1 + '\'' + + ", responseBody1='" + responseBody1 + '\'' + + ", syntaxResponseBody2='" + syntaxResponseBody2 + '\'' + + ", responseBody2='" + responseBody2 + '\'' + + '}'; } } diff --git a/src/main/resources/templates/page/add-edit-api.html b/src/main/resources/templates/page/add-edit-api.html index 9977941..b3c002d 100644 --- a/src/main/resources/templates/page/add-edit-api.html +++ b/src/main/resources/templates/page/add-edit-api.html @@ -27,7 +27,7 @@
-
@@ -153,13 +153,40 @@
+
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
- +
+ +
@@ -167,8 +194,9 @@
- + + +
@@ -186,8 +214,50 @@ + + + + + + + +