-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Component
Protocol Adapters (MCP, SKILL, REST…)
Description
Actual behavior:
When baseUri does not end with a /, the constructed request URLs are incorrect due to improper concatenation.
This results in invalid endpoints such as:
https://api.notion.com/v1pages
Expected behavior:
The framework should:
either automatically normalize baseUri (append the missing /),
or clearly document that a trailing / is required,
or throw an explicit validation error.
Steps to Reproduce
- Create a
capability.ymlfile with:
naftiko: "0.5"
capability:
exposes:
- type: "rest"
port: 8081
namespace: "sample"
resources:
- path: "/notion/{{path}}"
description: "This resource forwards requests to the Notion API, allowing access to any Notion endpoint by specifying the path parameter. For example, a request to /notion/pages would be forwarded to https://api.notion.com/v1/pages."
forward:
targetNamespace: notion
trustedHeaders:
- Notion-Version
consumes:
- type: "http"
description: "Forwarded requests from the /notion/{path} resource, to be sent to the Notion API"
namespace: "notion"
baseUri: "https://api.notion.com/v1/"- Start the runtime (Docker or JVM)
- Call:
GET http://localhost:8081/notion/pages - Observe the generated backend request URL
Capability File (if relevant)
naftiko: "0.5"
capability:
exposes:
- type: "rest"
port: 8081
namespace: "sample"
resources:
- path: "/notion/{{path}}"
description: "This resource forwards requests to the Notion API, allowing access to any Notion endpoint by specifying the path parameter. For example, a request to /notion/pages would be forwarded to https://api.notion.com/v1/pages."
forward:
targetNamespace: notion
trustedHeaders:
- Notion-Version
consumes:
- type: "http"
description: "Forwarded requests from the /notion/{path} resource, to be sent to the Notion API"
namespace: "notion"
baseUri: "https://api.notion.com/v1/"Logs & Stacktrace
Run HTTP_STATUS=$(curl -s -o /tmp/step2_response.json -w "%{http_code}" \
HTTP status: 400
Response body:
{"object":"error","status":400,"code":"invalid_request_url","message":"Invalid request URL.","request_id":"e447c84e-74e8-4817-9a1c-01d0d5a1e870"}Unexpected HTTP status: 400
Couldn't find any helper support the HTTP_Bearer challenge scheme.
Version
v1.0.0-alpha1
Runtime
Docker
Agent Context (optional)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working