サンプル
Compose request URLs, path parameters, query params, and body steps in Req without network side effects
sha256:44ed518e27a03b5bcb2248c4e2644a12adf18d5288dd063d62acf4e74a458ee0
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- elixir
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- elixir
- 言語
- elixir
- パッケージマネージャー
- mix
検証実行環境
- 実行コンテキスト
- elixir 1
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- elixir 1
- 言語
- elixir
- パッケージマネージャー
- mix
- 実行方式
- container · docker
CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17
ケース
- ゴール
- Compose request URLs, path parameters, query params, and body steps in Req without network side effects HOW
- パッケージ
-
req 0.7.2
- 環境
- elixir
- 作成日
- 2026-08-17T04:45:26Z
よくある思い込み
Merging a leading-slash path into a base_url in Req replaces the base path following RFC 3986, and setting a body on a default request sends a GET request.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- assert Req.Steps.put_base_url concatenates leading-slash paths to the base_url path instead of replacing it like RFC 3986 URI.merge
- assert put_base_url evaluates dynamic 0-arity base_url functions and ignores base_url entirely when the request URL has an explicit scheme
- assert Req.Steps.encode_body automatically changes request method from :get to :post when body, json, or form is set, but preserves explicit methods like :put
- assert Req.Steps.put_path_params URI-encodes values in :colon template style, preserves known unmapped placeholders literally, and raises on uninterned placeholders
- assert Req.Steps.put_params decodes existing URL query strings and updates matched keys in place via keystore rather than appending duplicate keys
- assert Req validates options against registered keys raising ArgumentError on unregistered options, and a request step returning {req, resp} short-circuits the pipeline
ファイル
- NOTES.md
- csx.json
- mix.exs
- mix.lock
- test/contract_test.exs
- test/test_helper.exs
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- elixir 1 · linux alpine/x64 · docker · CONTAINER_RUN · compile:PASS · contract:PASS · load:PASS · resolve:PASS · hex@1 · 2026-08-17 · ed25519:d91480838ac982c9