Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding all to req operation type enum #1842

Merged
merged 10 commits into from
Oct 6, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public Iterable<AclRequests> findAclRequestsByExample(
if (requestor != null && !requestor.isEmpty()) {
request.setRequestor(requestor);
}
if (requestOperationType != null) {
if (requestOperationType != null && !requestOperationType.value.equalsIgnoreCase("all")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick but "all" should probably be repalced by requestOperationType != RequestOperationType.ALL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aindriu-aiven updated.

request.setRequestOperationType(requestOperationType.value);
}
// check if debug is enabled so the logger doesnt waste resources converting object request to a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public enum RequestOperationType {
UPDATE("Update"),
PROMOTE("Promote"),
CLAIM("Claim"),
DELETE("Delete");
DELETE("Delete"),
ALL("All"); // All is applicable only to query requests

public final String value;

Expand Down
42 changes: 21 additions & 21 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3020,7 +3020,7 @@
"required" : false,
"schema" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
}
}, {
"name" : "search",
Expand Down Expand Up @@ -3113,7 +3113,7 @@
"required" : false,
"schema" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
}
}, {
"name" : "search",
Expand Down Expand Up @@ -3727,7 +3727,7 @@
"required" : false,
"schema" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
}
}, {
"name" : "order",
Expand Down Expand Up @@ -3819,7 +3819,7 @@
"required" : false,
"schema" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
}
}, {
"name" : "order",
Expand Down Expand Up @@ -4609,7 +4609,7 @@
"required" : false,
"schema" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
}
}, {
"name" : "search",
Expand Down Expand Up @@ -4694,7 +4694,7 @@
"required" : false,
"schema" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
}
}, {
"name" : "search",
Expand Down Expand Up @@ -5376,7 +5376,7 @@
"required" : false,
"schema" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
}
}, {
"name" : "topic",
Expand Down Expand Up @@ -5505,7 +5505,7 @@
"required" : false,
"schema" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
}
}, {
"name" : "order",
Expand Down Expand Up @@ -5871,7 +5871,7 @@
"properties" : {
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"environment" : {
"type" : "string"
Expand Down Expand Up @@ -6000,7 +6000,7 @@
"properties" : {
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"environment" : {
"type" : "string"
Expand Down Expand Up @@ -6637,7 +6637,7 @@
"properties" : {
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"environment" : {
"type" : "string"
Expand Down Expand Up @@ -6718,7 +6718,7 @@
"properties" : {
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"environment" : {
"type" : "string"
Expand Down Expand Up @@ -6794,7 +6794,7 @@
"properties" : {
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"environment" : {
"type" : "string"
Expand Down Expand Up @@ -7187,7 +7187,7 @@
},
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"requestStatus" : {
"type" : "string",
Expand Down Expand Up @@ -7472,7 +7472,7 @@
"properties" : {
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"count" : {
"type" : "integer",
Expand Down Expand Up @@ -7929,10 +7929,10 @@
"type" : "integer",
"format" : "int32"
},
"highestEnv" : {
"topicOwner" : {
"type" : "boolean"
},
"topicOwner" : {
"highestEnv" : {
"type" : "boolean"
}
},
Expand Down Expand Up @@ -8173,7 +8173,7 @@
},
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"requestStatus" : {
"type" : "string",
Expand Down Expand Up @@ -8557,7 +8557,7 @@
},
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"requestStatus" : {
"type" : "string",
Expand Down Expand Up @@ -8782,7 +8782,7 @@
},
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"requestStatus" : {
"type" : "string",
Expand Down Expand Up @@ -9297,7 +9297,7 @@
},
"requestOperationType" : {
"type" : "string",
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE" ]
"enum" : [ "CREATE", "UPDATE", "PROMOTE", "CLAIM", "DELETE", "ALL" ]
},
"requestStatus" : {
"type" : "string",
Expand Down
Loading