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

Fixed path for rest-router example and tests #391

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions crates/wick/wick-runtime/src/triggers/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ mod test {
)
.await?;

let res: serde_json::Value = get("/this/FIRST_VALUE/some/222?third=third_a&fourth=true")
let res: serde_json::Value = get("/api/this/FIRST_VALUE/some/222?third=third_a&fourth=true")
.await?
.json()
.await?;
Expand All @@ -723,7 +723,7 @@ mod test {
json!({"first":"FIRST_VALUE", "second": 222,"third":["third_a"], "fourth":true })
);

let res: serde_json::Value = get("/this/FIRST_VALUE/some/222?third=third_a&third=third_b&fourth=true")
let res: serde_json::Value = get("/api/this/FIRST_VALUE/some/222?third=third_a&third=third_b&fourth=true")
.await?
.json()
.await?;
Expand Down
6 changes: 3 additions & 3 deletions examples/http/rest-router.wick
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import:
- name: openapi
component:
kind: wick/component/manifest@v1
ref: registry.candle.dev/common/openapi-ui:4
ref: registry.candle.dev/common/openapi-ui:0.4.0
with:
schema_url: /openapi.json
schema_url: /api/openapi.json
triggers:
- kind: wick/trigger/http@v1
resource: http
Expand All @@ -38,7 +38,7 @@ triggers:
codec: Raw
operation: openapi::serve
- kind: wick/router/rest@v1
path: /
path: /api
tools:
openapi: true
info:
Expand Down