StandardUriDesign class
URL Design recommended by the standard. See https://jsonapi.org/recommendations/#urls
- Implemented types
Constructors
- StandardUriDesign(Uri base)
-
Creates an instance of UriDesign recommended by JSON:API standard.
The
base
URI will be used as a prefix for the generated URIs.const
Properties
Methods
-
collection(
String type) → Uri -
Returns a URL for the primary resource collection of type
type
. E.g./books
.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
Returns a URL for the related resource or collection.
The
type
andid
identify the primary resource and therelationship
is the relationship name. E.g./books/123/authors
.override -
relationship(
String type, String id, String relationship) → Uri -
Returns a URL for the relationship itself.
The
type
andid
identify the primary resource and therelationship
is the relationship name. E.g./books/123/relationships/authors
.override -
resource(
String type, String id) → Uri -
Returns a URL for the primary resource of type
type
with idid
. E.g./books/123
.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- pathOnly → StandardUriDesign
-
A "path only" version of the recommended URL design, e.g.
/books
,/books/42
,/books/42/authors
final
Static Methods
-
matchTarget(
Uri uri) → Target?