Skip to content

fix: wildcard and dynamic routes #1921

@jtmcdole

Description

@jtmcdole

Description

A route like api/v1/games/[id]/files/[...path] should have a handler that is String id, String path.

The generator spits out:
.dart_frog/server.dart:50:78: Error: Too few positional arguments: 3 required, 2 given.
..mount('/', (context) => api_v1_games_$id_files_$wildcard_path.onRequest(context,context.request.url.path));

Steps To Reproduce

Create a routes folder api/v1/games/[id]/files/[...path].dart

Expected Behavior

Support dynamic + wildcard routes.

Additional Context

dart_frog --version: 1.2.11

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expectedhas reproductive stepsThis issue contains detailed steps to reproduce the issuep1High-priority issues at the top of the work list

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions