サンプル
Show how Router.mount handles an exact prefix, a trailing slash, and nested routes
sha256:6fe02156c65bb35677dd2ce10c035be187650275bc57c1dbfb9d6ef58449ba79
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- dart
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- dart
- 言語
- dart
- パッケージマネージャー
- pub
検証実行環境
- 実行コンテキスト
- dart 3
- OS
- linux debian · glibc
- アーキテクチャ
- x64
- ランタイム
- dart 3
- 言語
- dart
- パッケージマネージャー
- pub
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17
ケース
- ゴール
- Show how Router.mount handles an exact prefix, a trailing slash, and nested routes HOW
- パッケージ
-
shelf 1.4.2
shelf_router 1.1.4
- 環境
- dart
- 作成日
- 2026-08-17T03:53:45Z
よくある思い込み
Mounting with `'/api'` only handles `/api/...` and should not match a request to `/api` itself.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- A GET request to /api after app.mount('/api', subRouter.call) reaches the mounted sub-router root.
- A GET request to /api/user/alex reaches the mounted parameter route with name equal to alex.
- A GET request to /api/ reaches the same sub-router root route as /api.
ファイル
- NOTES.md
- csx.json
- pubspec.lock
- pubspec.yaml
- test/contract.dart
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- dart 3 · linux debian/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · pub@1 · 2026-08-17 · ed25519:d91480838ac982c9