MountedRoute class final
One route as it is actually served, for anything that inspects the app.
This is the whole introspection contract. A package that generates API
documentation reads the method and path from here and finds its own
description in metadata, which keeps dust_server free of any particular
documentation format.
metadata is Object on purpose rather than a named type. An OpenAPI
generator, a permissions audit, and a route-listing command each want
something different in that slot, and naming one of them here would make the
runtime depend on a format it has no business knowing. metadataOf is how a
consumer takes its own type back and ignores everyone else's.
What this gives a documentation generator: every route, its method, and its
path with {name} placeholders intact. What it deliberately does not give:
parameter types and body schemas, which come from the build-time IR. This is
introspection of the route table, not a schema source.
Constructors
-
MountedRoute({required String method, required String path, List<
Object> metadata = const []}) -
Describes one served route.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metadata
→ List<
Object> -
Metadata from every group this route was mounted through, outermost
first, with
nullentries left out.final - method → String
-
The uppercase HTTP method.
final
- path → String
-
The full path, with
{name}placeholders intact.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
metadataOf<
T> () → T? -
The first piece of metadata of type
T, searching innermost first. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited