APIResponse class
Describes a single response from an API Operation, including design-time, static links to operations based on the response.
Constructors
-
APIResponse(String? description, {Map<
String, APIMediaType> ? content, Map<String, APIHeader> ? headers}) - APIResponse.empty()
-
APIResponse.schema(String? description, APISchemaObject schema, {Iterable<
String> contentTypes = const ["application/json"], Map<String, APIHeader> ? headers})
Properties
-
castMap
→ Map<
String, Cast> -
no setterinherited
-
content
↔ Map<
String, APIMediaType> ? -
A map containing descriptions of potential response payloads.
getter/setter pair
- description ↔ String?
-
A short description of the response.
getter/setter pair
-
extensions
↔ Map<
String, dynamic> -
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ Map<
String, APIHeader> ? -
Maps a header name to its definition.
getter/setter pair
- referenceURI ↔ Uri
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addContent(
String contentType, APISchemaObject bodyObject) → void -
Adds a
bodyObject
to content for a content-type. -
addHeader(
String name, APIHeader header) → void -
Adds a
header
to headers forname
. -
decode(
KeyedArchive object) → void -
override
-
encode(
KeyedArchive object) → void -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited