Skip to content

Commit

Permalink
Upd: Add OpenAPI validation in caddy
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <[email protected]>
  • Loading branch information
georgepadayatti committed Dec 4, 2023
1 parent 766bb41 commit 2ab0ec1
Show file tree
Hide file tree
Showing 3 changed files with 306 additions and 578 deletions.
10 changes: 6 additions & 4 deletions test/Caddyfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ http://localhost:80 {
path /*
}

reverse_proxy @api {
to http://api:80
}

route @api {
reverse_proxy @api {
to http://api:80
}
openapi {
spec /consent-openapi.yaml
log_error
# fall_through
check {
req_params req_body
# When we are ready to handle validation of the body:
# req_params req_body resp_body
}
validate_servers
validate_servers false
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/Dockerfile_caddy
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM caddy:2.7.3-builder AS builder

RUN xcaddy build --with github.com/chukmunnlee/caddy-openapi@v0.7.0
RUN xcaddy build --with github.com/georgepadayatti/caddy-openapi@v0.8.0

FROM caddy:2.7.3-alpine

Expand Down
Loading

0 comments on commit 2ab0ec1

Please sign in to comment.