Skip to content

docs(env): define URL input ownership#845

Merged
yordis merged 3 commits intomasterfrom
yordis/fixes-798
Apr 22, 2026
Merged

docs(env): define URL input ownership#845
yordis merged 3 commits intomasterfrom
yordis/fixes-798

Conversation

@yordis
Copy link
Copy Markdown
Member

@yordis yordis commented Apr 22, 2026

  • make the URL contract explicit for callers discussing malformed request targets in Tesla does not properly encode URLs #798
  • keep encoding, validation, and normalization decisions with applications instead of baking adapter-specific semantics into Tesla

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Copilot AI review requested due to automatic review settings April 22, 2026 02:23
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 22, 2026

PR Summary

Low Risk
Documentation-only change that clarifies caller expectations for env.url; no runtime behavior or data handling is modified.

Overview
Clarifies the Tesla.Env url type contract by adding @typedoc stating that callers must provide a valid, already-encoded URL/request target (including relative targets when used with Tesla.Middleware.BaseUrl).

Explicitly notes that Tesla won’t validate/normalize/percent-encode URL paths and that middleware may rewrite env.url.

Reviewed by Cursor Bugbot for commit e1d1449. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Clarifies the ownership/contract of Tesla.Env.url to set expectations around URL validity/encoding (context: malformed request targets discussed in #798), keeping encoding/normalization decisions in application code rather than Tesla.

Changes:

  • Add @typedoc for t:Tesla.Env.url/0 describing it as a request URL or request target.
  • Document that callers should provide a valid, already-encoded value and that Tesla won’t validate/normalize malformed input.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/tesla/env.ex Outdated
yordis added 2 commits April 21, 2026 22:27
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis merged commit 3c79818 into master Apr 22, 2026
8 of 10 checks passed
@yordis yordis deleted the yordis/fixes-798 branch April 22, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants