summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfengweihao <[email protected]>2024-10-31 10:07:01 +0800
committerfengweihao <[email protected]>2024-10-31 10:07:01 +0800
commitcb35a2b92b6d195db736f8d9354ee918effdb036 (patch)
treec682f34be82560a9903f7006cf8e9e7496e05397
parentb62c1037f6efe5836653ced8a93ccce22bdfb79a (diff)
Field changes in hit pathv4.1.1-20241031
-rw-r--r--platform/src/verify_matcher.cpp6
-rw-r--r--test/resource/HitPolicyResult.json32
2 files changed, 19 insertions, 19 deletions
diff --git a/platform/src/verify_matcher.cpp b/platform/src/verify_matcher.cpp
index 8c89371..a17783e 100644
--- a/platform/src/verify_matcher.cpp
+++ b/platform/src/verify_matcher.cpp
@@ -1398,7 +1398,7 @@ int http_hit_policy_list(struct verify_policy_query *verify_policy, size_t hit_c
cJSON *hit_obj=NULL, *policy_obj=NULL;
cJSON *topObjectList=NULL, *topObject=NULL;
hit_obj=cJSON_CreateArray();
- cJSON_AddItemToObject(data_obj, "hit_policy_list", hit_obj);
+ cJSON_AddItemToObject(data_obj, "hit_rules", hit_obj);
if (ctx->hit_cnt >= 1)
{
for (i = 0; i < ctx->hit_cnt; i++)
@@ -1419,13 +1419,13 @@ int http_hit_policy_list(struct verify_policy_query *verify_policy, size_t hit_c
{
if(uuid_compare(ctx->enforce_rules[rules].rule_uuid, ctx->hit_rules[i].rule_uuid) == 0)
{
- cJSON_AddBoolToObject(policy_obj, "is_execute_policy", true);
+ cJSON_AddBoolToObject(policy_obj, "is_execute", true);
succeeded = true;
}
}
if (succeeded == false)
{
- cJSON_AddBoolToObject(policy_obj, "is_execute_policy", false);
+ cJSON_AddBoolToObject(policy_obj, "is_execute", false);
}
cJSON_AddItemToArray(hit_obj, policy_obj);
uuid_copy(result_rule_uuid[i], ctx->hit_rules[i].rule_uuid);
diff --git a/test/resource/HitPolicyResult.json b/test/resource/HitPolicyResult.json
index 323aa7a..f2c7a9d 100644
--- a/test/resource/HitPolicyResult.json
+++ b/test/resource/HitPolicyResult.json
@@ -5,11 +5,11 @@
"code": 200,
"msg": "Success",
"data": {
- "hit_policy_list": [
+ "hit_rules": [
{
"uuid": "00001021-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": true,
+ "is_execute": true,
"top_object_list": [
{
"object_uuid": "00005000-0000-0000-0000-000000000000",
@@ -47,11 +47,11 @@
"code": 200,
"msg": "Success",
"data": {
- "hit_policy_list": [
+ "hit_rules": [
{
"uuid": "00001022-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": true,
+ "is_execute": true,
"top_object_list": [
{
"tag_uuid": "00000011-0000-0000-0000-000000000000",
@@ -199,11 +199,11 @@
"code": 200,
"msg": "Success",
"data": {
- "hit_policy_list": [
+ "hit_rules": [
{
"uuid": "00001024-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": true,
+ "is_execute": true,
"top_object_list": [
{
"object_uuid": "00005001-0000-0000-0000-000000000000",
@@ -234,7 +234,7 @@
{
"uuid": "00001023-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": false,
+ "is_execute": false,
"top_object_list": [
{
"object_uuid": "00005001-0000-0000-0000-000000000000",
@@ -355,11 +355,11 @@
"code": 200,
"msg": "Success",
"data": {
- "hit_policy_list": [
+ "hit_rules": [
{
"uuid": "00001026-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": true,
+ "is_execute": true,
"top_object_list": [
{
"object_uuid": "00003022-0000-0000-0000-000000000000",
@@ -372,7 +372,7 @@
{
"uuid": "00001025-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": true,
+ "is_execute": true,
"top_object_list": [
{
"object_uuid": "00003023-0000-0000-0000-000000000000",
@@ -438,11 +438,11 @@
"code": 200,
"msg": "Success",
"data": {
- "hit_policy_list": [
+ "hit_rules": [
{
"uuid": "00001027-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": true,
+ "is_execute": true,
"top_object_list": [
{
"object_uuid": "00003022-0000-0000-0000-000000000000",
@@ -493,11 +493,11 @@
"code": 200,
"msg": "Success",
"data": {
- "hit_policy_list": [
+ "hit_rules": [
{
"uuid": "00600010-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": true,
+ "is_execute": true,
"top_object_list": [
{
"object_uuid": "00500100-0000-0000-0000-000000000000",
@@ -670,11 +670,11 @@
"code": 200,
"msg": "Success",
"data": {
- "hit_policy_list": [
+ "hit_rules": [
{
"uuid": "00002020-0000-0000-0000-000000000000",
"policyName": "",
- "is_execute_policy": true,
+ "is_execute": true,
"top_object_list": [
{
"object_uuid": "00008000-0000-0000-0000-000000000000",