-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nikolas Rimikis <[email protected]>
- Loading branch information
Showing
37 changed files
with
11,572 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
// Use of this source code is governed by a Apache 2.0 license. It can be obtained at https://www.apache.org/licenses/LICENSE-2.0.html. | ||
|
||
// OpenAPI client generated by Dynamite. Do not manually edit this file. | ||
|
||
// ignore_for_file: camel_case_types, discarded_futures | ||
// ignore_for_file: no_leading_underscores_for_local_identifiers | ||
// ignore_for_file: public_member_api_docs, unreachable_switch_case | ||
|
||
library petstore_openapi; | ||
/// Swagger Petstore Version: 1.0.0. | ||
/// | ||
/// A sample API that uses a petstore as an example to demonstrate features in the OpenAPI 3.0 specification. | ||
/// | ||
/// You can contact the Swagger API Team team under: | ||
/// Email: `[email protected]`. | ||
/// Website: `http://swagger.io`. | ||
/// | ||
/// Use of this source code is governed by a Apache 2.0 license. | ||
/// It can be obtained at https://www.apache.org/licenses/LICENSE-2.0.html. | ||
/// | ||
/// Usage of these apis must adhere to the terms of service: `http://swagger.io/terms/`. | ||
library; | ||
|
||
import 'dart:convert'; | ||
import 'dart:typed_data'; | ||
|
@@ -20,6 +36,7 @@ import 'package:uri/uri.dart'; | |
part 'petstore.openapi.g.dart'; | ||
|
||
class $Client extends DynamiteClient { | ||
/// Creates a new [DynamiteClient] for untagged requests. | ||
$Client( | ||
super.baseURL, { | ||
super.baseHeaders, | ||
|
@@ -28,6 +45,7 @@ class $Client extends DynamiteClient { | |
super.cookieJar, | ||
}); | ||
|
||
/// Creates a new [$Client] from another [client]. | ||
$Client.fromClient(DynamiteClient client) | ||
: super( | ||
client.baseURL, | ||
|
@@ -39,9 +57,9 @@ class $Client extends DynamiteClient { | |
|
||
/// Returns all pets from the system that the user has access to. | ||
/// Nam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia. | ||
/// . | ||
/// | ||
/// Sed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien. | ||
/// . | ||
/// | ||
/// | ||
/// Returns a [Future] containing a [DynamiteResponse] with the status code, deserialized body and headers. | ||
/// Throws a [DynamiteApiException] if the API call does not return an expected status code. | ||
|
@@ -70,9 +88,9 @@ class $Client extends DynamiteClient { | |
|
||
/// Returns all pets from the system that the user has access to. | ||
/// Nam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia. | ||
/// . | ||
/// | ||
/// Sed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien. | ||
/// . | ||
/// | ||
/// | ||
/// This method and the response it returns is experimental. The API might change without a major version bump. | ||
/// | ||
|
@@ -301,81 +319,113 @@ class $Client extends DynamiteClient { | |
} | ||
} | ||
|
||
/// @nodoc | ||
@BuiltValue(instantiable: false) | ||
abstract interface class $NewPetInterface { | ||
String get name; | ||
String? get tag; | ||
} | ||
|
||
abstract class NewPet implements $NewPetInterface, Built<NewPet, NewPetBuilder> { | ||
/// Creates a new NewPet object using the builder pattern. | ||
factory NewPet([void Function(NewPetBuilder)? b]) = _$NewPet; | ||
|
||
// coverage:ignore-start | ||
const NewPet._(); | ||
// coverage:ignore-end | ||
|
||
/// Creates a new object from the given [json] data. | ||
/// | ||
/// Use [toJson] to serialize it back into json. | ||
// coverage:ignore-start | ||
factory NewPet.fromJson(Map<String, dynamic> json) => jsonSerializers.deserializeWith(serializer, json)!; | ||
// coverage:ignore-end | ||
|
||
/// Parses this object into a json like map. | ||
/// | ||
/// Use the fromJson factory to revive it again. | ||
// coverage:ignore-start | ||
Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>; | ||
// coverage:ignore-end | ||
|
||
/// Serializer for NewPet. | ||
static Serializer<NewPet> get serializer => _$newPetSerializer; | ||
} | ||
|
||
/// @nodoc | ||
@BuiltValue(instantiable: false) | ||
abstract interface class $Pet_1Interface { | ||
int get id; | ||
} | ||
|
||
/// @nodoc | ||
@BuiltValue(instantiable: false) | ||
abstract interface class $PetInterface implements $NewPetInterface, $Pet_1Interface {} | ||
|
||
abstract class Pet implements $PetInterface, Built<Pet, PetBuilder> { | ||
/// Creates a new Pet object using the builder pattern. | ||
factory Pet([void Function(PetBuilder)? b]) = _$Pet; | ||
|
||
// coverage:ignore-start | ||
const Pet._(); | ||
// coverage:ignore-end | ||
|
||
/// Creates a new object from the given [json] data. | ||
/// | ||
/// Use [toJson] to serialize it back into json. | ||
// coverage:ignore-start | ||
factory Pet.fromJson(Map<String, dynamic> json) => jsonSerializers.deserializeWith(serializer, json)!; | ||
// coverage:ignore-end | ||
|
||
/// Parses this object into a json like map. | ||
/// | ||
/// Use the fromJson factory to revive it again. | ||
// coverage:ignore-start | ||
Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>; | ||
// coverage:ignore-end | ||
|
||
/// Serializer for Pet. | ||
static Serializer<Pet> get serializer => _$petSerializer; | ||
} | ||
|
||
/// @nodoc | ||
@BuiltValue(instantiable: false) | ||
abstract interface class $ErrorInterface { | ||
int get code; | ||
String get message; | ||
} | ||
|
||
abstract class Error implements $ErrorInterface, Built<Error, ErrorBuilder> { | ||
/// Creates a new Error object using the builder pattern. | ||
factory Error([void Function(ErrorBuilder)? b]) = _$Error; | ||
|
||
// coverage:ignore-start | ||
const Error._(); | ||
// coverage:ignore-end | ||
|
||
/// Creates a new object from the given [json] data. | ||
/// | ||
/// Use [toJson] to serialize it back into json. | ||
// coverage:ignore-start | ||
factory Error.fromJson(Map<String, dynamic> json) => jsonSerializers.deserializeWith(serializer, json)!; | ||
// coverage:ignore-end | ||
|
||
/// Parses this object into a json like map. | ||
/// | ||
/// Use the fromJson factory to revive it again. | ||
// coverage:ignore-start | ||
Map<String, dynamic> toJson() => jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>; | ||
// coverage:ignore-end | ||
|
||
/// Serializer for Error. | ||
static Serializer<Error> get serializer => _$errorSerializer; | ||
} | ||
|
||
// coverage:ignore-start | ||
/// Serializer for all values in this library. | ||
/// | ||
/// Serializes values into the `built_value` wire format. | ||
/// See: [jsonSerializers] for serializing into json. | ||
@visibleForTesting | ||
final Serializers serializers = (Serializers().toBuilder() | ||
..addBuilderFactory(const FullType(BuiltList, [FullType(String)]), ListBuilder<String>.new) | ||
|
@@ -387,6 +437,11 @@ final Serializers serializers = (Serializers().toBuilder() | |
..addBuilderFactory(const FullType(Error), ErrorBuilder.new) | ||
..add(Error.serializer)) | ||
.build(); | ||
|
||
/// Serializer for all values in this library. | ||
/// | ||
/// Serializes values into the json. Json serialization is more expensive than the built_value wire format. | ||
/// See: [serializers] for serializing into the `built_value` wire format. | ||
@visibleForTesting | ||
final Serializers jsonSerializers = (serializers.toBuilder() | ||
..add(DynamiteDoubleSerializer()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.