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

Added lost http methods #1248

Merged
merged 1 commit into from
Oct 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,27 +211,29 @@ public static Operation getOperationOnPathItem(PathItem pathItem, HttpMethod htt

return switch (httpMethod) {
case GET -> pathItem.getGet();
case POST -> pathItem.getPost();
case PUT -> pathItem.getPut();
case PATCH -> pathItem.getPatch();
case POST -> pathItem.getPost();
case DELETE -> pathItem.getDelete();
case HEAD -> pathItem.getHead();
case OPTIONS -> pathItem.getOptions();
case HEAD -> pathItem.getHead();
case PATCH -> pathItem.getPatch();
case TRACE -> pathItem.getTrace();
default -> null;
};
}

public static void setOperationOnPathItem(PathItem pathItem, HttpMethod httpMethod, Operation operation) {
if (pathItem == null) {
return;
}
switch (httpMethod) {
case GET -> pathItem.setGet(operation);
case POST -> pathItem.setPost(operation);
case PUT -> pathItem.setPut(operation);
case POST -> pathItem.setPost(operation);
case DELETE -> pathItem.setDelete(operation);
case OPTIONS -> pathItem.setOptions(operation);
case HEAD -> pathItem.setHead(operation);
case PATCH -> pathItem.setPatch(operation);
case TRACE -> pathItem.setTrace(operation);
default -> {
// do nothing
}
Expand Down
Loading