Skip to content

Commit

Permalink
fixes #191 Add method and path to the STATUS_METHOD_NOT_ALLOWED (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehu committed Dec 17, 2021
1 parent 1bd1759 commit 0828735
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void handleRequest(final HttpServerExchange exchange) throws Exception {
final Operation operation = path.getOperation(httpMethod);

if (operation == null) {
setExchangeStatus(exchange, STATUS_METHOD_NOT_ALLOWED);
setExchangeStatus(exchange, STATUS_METHOD_NOT_ALLOWED, httpMethod, openApiPathString.normalised());
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void handleRequest(final HttpServerExchange exchange) throws Exception {
operation = swaggerPath.getOperation(httpMethod);

if (operation == null) {
setExchangeStatus(exchange, STATUS_METHOD_NOT_ALLOWED);
setExchangeStatus(exchange, STATUS_METHOD_NOT_ALLOWED, httpMethod, swaggerPathString.normalised());
return;
}
openApiOperation = new OpenApiOperation(swaggerPathString, swaggerPath, httpMethod, operation);
Expand Down

0 comments on commit 0828735

Please sign in to comment.