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
baseURI 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
typeandididentify the primary resource and therelationshipis 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
typeandididentify the primary resource and therelationshipis 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
typewith 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/authorsfinal
Static Methods
-
matchTarget(
Uri uri) → Target?