openapi library

Functions

convertParametersForCollectionFormat(ParameterToString deserializeDelegate, String? collectionFormat, String? name, dynamic value) Iterable<QueryParam>
decodeBodyBytes(Stream<List<int>> body) Future<String?>
Returns the decoded body by utf-8 if application/json with the given headers. Else, returns the decoded body by default algorithm of dart:http. Because avoid to text garbling when header only contains 'application/json' without '; charset=utf-8'.
matchLeftovers(dynamic value, String targetType, Deserializer deserialize) → dynamic
openApiDateParameterToString(dynamic value, [bool encode = true]) String
Convert a Date to a string parameter. A {path} parameter requires encoding, whereas a Query parameter doesn't. To ensure a non-breaking API, we use encode to default true.
openApiDateTimeFromJson(dynamic json) DateTime
this exists because we otherwise need an extension method DateTime.fromJson and i don't want to clash with other libs
openApiDateTimeList(dynamic json) List<DateTime>
this is the same, but for a json object which is in fact a list of strings
openApiDateTimeParameterToString(dynamic value, [bool encode = true]) String
Convert a DateTime to a string parameter. A {path} parameter requires encoding, whereas a Query parameter doesn't. To ensure a non-breaking API, we use encode to default true.

Typedefs

Deserializer = dynamic Function(dynamic value, String targetType)
ParameterToString = String Function(dynamic value)

Exceptions / Errors

ApiException
DeserialisationError
represents a failed deserialisation in nullSafe mode because we cannot find a non-null version of the field