refactor(项目管理): 误报类型枚举
This commit is contained in:
parent
6aa7112d16
commit
a834a563fb
|
@ -1,5 +1,9 @@
|
|||
package io.metersphere.project.dto;
|
||||
|
||||
import io.metersphere.project.enums.FakeErrorType;
|
||||
import io.metersphere.sdk.constants.TemplateScene;
|
||||
import io.metersphere.system.valid.EnumValue;
|
||||
import io.metersphere.validation.groups.Created;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
@ -29,7 +33,8 @@ public class FakeErrorDTO implements Serializable {
|
|||
@NotBlank(message = "{fake_error.type.not_blank}")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "匹配规则-内容类型/header/data/body", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@Schema(description = "匹配规则-内容类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@EnumValue(enumClass = FakeErrorType.class, groups = {Created.class})
|
||||
@NotBlank(message = "{fake_error.resp_type.not_blank}")
|
||||
private String respType;
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package io.metersphere.project.enums;
|
||||
|
||||
/**
|
||||
* @author: LAN
|
||||
* @date: 2024/1/12 11:03
|
||||
* @version: 1.0
|
||||
*/
|
||||
public enum FakeErrorType {
|
||||
RESPONSE_HEADERS,
|
||||
RESPONSE_DATA,
|
||||
RESPONSE_CODE
|
||||
}
|
|
@ -133,9 +133,9 @@
|
|||
const currentList = ref<FakeTableListItem[]>([]);
|
||||
const tableStore = useTableStore();
|
||||
const headerOptions = computed(() => [
|
||||
{ label: 'Response Headers', value: 'headers' },
|
||||
{ label: 'Response Data', value: 'data' },
|
||||
{ label: 'Response Code', value: 'code' },
|
||||
{ label: 'Response Headers', value: 'RESPONSE_HEADERS' },
|
||||
{ label: 'Response Data', value: 'RESPONSE_DATA' },
|
||||
{ label: 'Response Code', value: 'RESPONSE_CODE' },
|
||||
]);
|
||||
const relationOptions = computed(() => [
|
||||
{ label: '包含', value: 'contain' },
|
||||
|
@ -452,7 +452,7 @@
|
|||
type: 'select',
|
||||
options: headerOptions.value,
|
||||
className: 'w-[205px]',
|
||||
defaultValue: 'headers',
|
||||
defaultValue: 'RESPONSE_HEADERS',
|
||||
},
|
||||
{
|
||||
filed: 'relation', // 匹配规则-操作类型
|
||||
|
|
Loading…
Reference in New Issue