diff --git a/.gitignore b/.gitignore
index e24cf380cfe..980aad7ded4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -234,11 +234,15 @@ samples/client/petstore/erlang-proper/rebar.lock
samples/server/petstore/erlang-server/_build/
samples/server/petstore/erlang-server/rebar.lock
-# dart
-samples/client/petstore/dart/petstore/packages
-samples/client/petstore/dart/flutter_petstore/test/packages
-samples/client/petstore/dart/petstore/test/packages
-**/.dart_tool
+# Dart
+**/dart*/**/.dart_tool
+**/dart*/**/.packages
+**/dart*/**/pubspec.lock
+# Dart dio
+**/dart*/**/*.g.dart
+# Dart jaguar
+**/dart*/**/*.jser.dart
+**/dart*/**/*.jretro.dart
# JS
samples/client/petstore/javascript-es6/package-lock.json
diff --git a/bin/configs/dart-dio-petstore-client-lib-fake.yaml b/bin/configs/dart-dio-petstore-client-lib-fake.yaml
new file mode 100644
index 00000000000..2463da464ed
--- /dev/null
+++ b/bin/configs/dart-dio-petstore-client-lib-fake.yaml
@@ -0,0 +1,6 @@
+generatorName: dart-dio
+outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/dart-dio
+additionalProperties:
+ hideGenerationTimestamp: "true"
diff --git a/bin/configs/dart-dio.yaml b/bin/configs/dart-dio-petstore-client-lib-oas2.yaml
similarity index 77%
rename from bin/configs/dart-dio.yaml
rename to bin/configs/dart-dio-petstore-client-lib-oas2.yaml
index 7013cbd4fae..447136518a8 100644
--- a/bin/configs/dart-dio.yaml
+++ b/bin/configs/dart-dio-petstore-client-lib-oas2.yaml
@@ -1,5 +1,5 @@
generatorName: dart-dio
-outputDir: samples/client/petstore/dart-dio
+outputDir: samples/client/petstore/dart-dio/petstore_client_lib
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/dart-dio
additionalProperties:
diff --git a/bin/configs/dart-dio-petstore-client-lib.yaml b/bin/configs/dart-dio-petstore-client-lib.yaml
new file mode 100644
index 00000000000..8db24ccb0ce
--- /dev/null
+++ b/bin/configs/dart-dio-petstore-client-lib.yaml
@@ -0,0 +1,6 @@
+generatorName: dart-dio
+outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/dart-dio
+additionalProperties:
+ hideGenerationTimestamp: "true"
diff --git a/bin/configs/dart-petstore-client-lib-fake.yaml b/bin/configs/dart-petstore-client-lib-fake.yaml
new file mode 100644
index 00000000000..8dda4df4b0a
--- /dev/null
+++ b/bin/configs/dart-petstore-client-lib-fake.yaml
@@ -0,0 +1,6 @@
+generatorName: dart
+outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib_fake
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/dart2
+additionalProperties:
+ hideGenerationTimestamp: "true"
diff --git a/bin/configs/dart-petstore_client_lib.yaml b/bin/configs/dart-petstore-client-lib-oas2.yaml
similarity index 100%
rename from bin/configs/dart-petstore_client_lib.yaml
rename to bin/configs/dart-petstore-client-lib-oas2.yaml
diff --git a/bin/configs/dart-petstore-client-lib.yaml b/bin/configs/dart-petstore-client-lib.yaml
new file mode 100644
index 00000000000..8b4a6deefd7
--- /dev/null
+++ b/bin/configs/dart-petstore-client-lib.yaml
@@ -0,0 +1,6 @@
+generatorName: dart
+outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib
+inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
+templateDir: modules/openapi-generator/src/main/resources/dart2
+additionalProperties:
+ hideGenerationTimestamp: "true"
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache
index be116b59e8d..5ad5beee02c 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/class.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/class.mustache
@@ -8,12 +8,12 @@ abstract class {{classname}} implements Built<{{classname}}, {{classname}}Builde
{{#vars}}
{{#description}}/* {{{description}}} */{{/description}}
{{#isNullable}}
- @nullable
+ @nullable
{{/isNullable}}
@BuiltValueField(wireName: r'{{baseName}}')
{{#isEnum}}{{classname}}{{{nameInCamelCase}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}} get {{name}};
{{#allowableValues}}
- {{#min}} // range from {{min}} to {{max}}{{/min}}//{{^min}}enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}
+ {{#min}}// range from {{min}} to {{max}}{{/min}}//{{^min}} enum {{name}}Enum { {{#values}} {{.}}, {{/values}} };{{/min}}
{{/allowableValues}}
{{/vars}}
diff --git a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache
index ff2c84d195c..b696da9cdb4 100644
--- a/modules/openapi-generator/src/main/resources/dart-dio/model.mustache
+++ b/modules/openapi-generator/src/main/resources/dart-dio/model.mustache
@@ -1,8 +1,8 @@
{{#models}}
{{#model}}
{{#imports}}
- import '{{.}}';
+import '{{.}}';
{{/imports}}
- {{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}}
+{{#isEnum}}{{>enum}}{{/isEnum}}{{^isEnum}}{{>class}}{{/isEnum}}
{{/model}}
{{/models}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart2/class.mustache b/modules/openapi-generator/src/main/resources/dart2/class.mustache
index bfcce5442b4..58a78278602 100644
--- a/modules/openapi-generator/src/main/resources/dart2/class.mustache
+++ b/modules/openapi-generator/src/main/resources/dart2/class.mustache
@@ -152,7 +152,12 @@ class {{{classname}}} {
{{/items.isArray}}
{{/isMap}}
{{^isMap}}
+ {{#isBinary}}
+ {{{name}}}: null, // No support for decoding binary content from JSON
+ {{/isBinary}}
+ {{^isBinary}}
{{{name}}}: {{{complexType}}}.fromJson(json['{{{baseName}}}']),
+ {{/isBinary}}
{{/isMap}}
{{/isArray}}
{{/complexType}}
diff --git a/pom.xml b/pom.xml
index 9952eff87d0..79ff6da7d47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1349,8 +1349,12 @@
samples/client/petstore/javascript-promise-es6
samples/server/petstore/go-api-server
samples/server/petstore/go-gin-api-server
+ samples/client/petstore/dart2/petstore_client_lib
samples/client/petstore/dart2/petstore
- samples/client/petstore/dart-dio
+ samples/openapi3/client/petstore/dart2/petstore_client_lib
+ samples/openapi3/client/petstore/dart2/petstore
+ samples/client/petstore/dart-dio/petstore_client_lib
+ samples/openapi3/client/petstore/dart-dio/petstore_client_lib
samples/client/petstore/dart-jaguar/openapi
samples/client/petstore/dart-jaguar/flutter_petstore/openapi
diff --git a/samples/client/petstore/dart-dio/.gitignore b/samples/client/petstore/dart-dio/petstore_client_lib/.gitignore
similarity index 91%
rename from samples/client/petstore/dart-dio/.gitignore
rename to samples/client/petstore/dart-dio/petstore_client_lib/.gitignore
index f8005b318fe..8092a49d515 100644
--- a/samples/client/petstore/dart-dio/.gitignore
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/.gitignore
@@ -27,9 +27,6 @@ doc/api/
# (Library packages only! Remove pattern if developing an application package)
pubspec.lock
-# Don't commit *.g.dart files which are genrated during integration tests
-lib/**/*.g.dart
-
# Don’t commit files and directories created by other development environments.
# For example, if your development environment creates any of the following files,
# consider putting them in a global ignore file:
diff --git a/samples/client/petstore/dart2/openapi/.openapi-generator-ignore b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator-ignore
similarity index 100%
rename from samples/client/petstore/dart2/openapi/.openapi-generator-ignore
rename to samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator-ignore
diff --git a/samples/client/petstore/dart-dio/.openapi-generator/FILES b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/FILES
similarity index 97%
rename from samples/client/petstore/dart-dio/.openapi-generator/FILES
rename to samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/FILES
index e9358a18c39..b14eb44e2a0 100644
--- a/samples/client/petstore/dart-dio/.openapi-generator/FILES
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/FILES
@@ -1,3 +1,4 @@
+.gitignore
README.md
analysis_options.yaml
doc/ApiResponse.md
diff --git a/samples/client/petstore/dart-dio/.openapi-generator/VERSION b/samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
similarity index 100%
rename from samples/client/petstore/dart-dio/.openapi-generator/VERSION
rename to samples/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
diff --git a/samples/client/petstore/dart-dio/README.md b/samples/client/petstore/dart-dio/petstore_client_lib/README.md
similarity index 100%
rename from samples/client/petstore/dart-dio/README.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/README.md
diff --git a/samples/client/petstore/dart-dio/analysis_options.yaml b/samples/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml
similarity index 100%
rename from samples/client/petstore/dart-dio/analysis_options.yaml
rename to samples/client/petstore/dart-dio/petstore_client_lib/analysis_options.yaml
diff --git a/samples/client/petstore/dart-dio/doc/ApiResponse.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/ApiResponse.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/ApiResponse.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/ApiResponse.md
diff --git a/samples/client/petstore/dart-dio/doc/Category.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/Category.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/Category.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/Category.md
diff --git a/samples/client/petstore/dart-dio/doc/Order.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/Order.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/Order.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/Order.md
diff --git a/samples/client/petstore/dart-dio/doc/Pet.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/Pet.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/Pet.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/Pet.md
diff --git a/samples/client/petstore/dart-dio/doc/PetApi.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/PetApi.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/PetApi.md
diff --git a/samples/client/petstore/dart-dio/doc/StoreApi.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/StoreApi.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/StoreApi.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/StoreApi.md
diff --git a/samples/client/petstore/dart-dio/doc/Tag.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/Tag.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/Tag.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/Tag.md
diff --git a/samples/client/petstore/dart-dio/doc/User.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/User.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/User.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/User.md
diff --git a/samples/client/petstore/dart-dio/doc/UserApi.md b/samples/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md
similarity index 100%
rename from samples/client/petstore/dart-dio/doc/UserApi.md
rename to samples/client/petstore/dart-dio/petstore_client_lib/doc/UserApi.md
diff --git a/samples/client/petstore/dart-dio/lib/api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/api.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/api.dart
diff --git a/samples/client/petstore/dart-dio/lib/api/pet_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/api/pet_api.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart
diff --git a/samples/client/petstore/dart-dio/lib/api/store_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/api/store_api.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart
diff --git a/samples/client/petstore/dart-dio/lib/api/user_api.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/api/user_api.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart
diff --git a/samples/client/petstore/dart-dio/lib/api_util.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/api_util.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/api_util.dart
diff --git a/samples/client/petstore/dart-dio/lib/auth/api_key_auth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/auth/api_key_auth.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/api_key_auth.dart
diff --git a/samples/client/petstore/dart-dio/lib/auth/auth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/auth/auth.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/auth.dart
diff --git a/samples/client/petstore/dart-dio/lib/auth/basic_auth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/auth/basic_auth.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/basic_auth.dart
diff --git a/samples/client/petstore/dart-dio/lib/auth/oauth.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/auth/oauth.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/auth/oauth.dart
diff --git a/samples/client/petstore/dart-dio/lib/model/api_response.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
similarity index 84%
rename from samples/client/petstore/dart-dio/lib/model/api_response.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
index 897197d7d9f..77381d6b5e2 100644
--- a/samples/client/petstore/dart-dio/lib/model/api_response.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/api_response.dart
@@ -1,4 +1,4 @@
- import 'package:built_value/built_value.dart';
+import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'api_response.g.dart';
@@ -6,15 +6,15 @@ part 'api_response.g.dart';
abstract class ApiResponse implements Built {
- @nullable
+ @nullable
@BuiltValueField(wireName: r'code')
int get code;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'type')
String get type;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'message')
String get message;
diff --git a/samples/client/petstore/dart-dio/lib/model/category.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
similarity index 84%
rename from samples/client/petstore/dart-dio/lib/model/category.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
index 25f277d0324..46e4a1f7d88 100644
--- a/samples/client/petstore/dart-dio/lib/model/category.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/category.dart
@@ -1,4 +1,4 @@
- import 'package:built_value/built_value.dart';
+import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'category.g.dart';
@@ -6,11 +6,11 @@ part 'category.g.dart';
abstract class Category implements Built {
- @nullable
+ @nullable
@BuiltValueField(wireName: r'id')
int get id;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'name')
String get name;
diff --git a/samples/client/petstore/dart-dio/lib/model/order.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
similarity index 82%
rename from samples/client/petstore/dart-dio/lib/model/order.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
index 3931fb9d72b..700b6578821 100644
--- a/samples/client/petstore/dart-dio/lib/model/order.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/order.dart
@@ -1,5 +1,5 @@
- import 'package:built_collection/built_collection.dart';
- import 'package:built_value/built_value.dart';
+import 'package:built_collection/built_collection.dart';
+import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'order.g.dart';
@@ -7,28 +7,28 @@ part 'order.g.dart';
abstract class Order implements Built {
- @nullable
+ @nullable
@BuiltValueField(wireName: r'id')
int get id;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'petId')
int get petId;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'quantity')
int get quantity;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'shipDate')
DateTime get shipDate;
/* Order Status */
- @nullable
+ @nullable
@BuiltValueField(wireName: r'status')
OrderStatus get status;
- //enum statusEnum { placed, approved, delivered, };
+ // enum statusEnum { placed, approved, delivered, };
- @nullable
+ @nullable
@BuiltValueField(wireName: r'complete')
bool get complete;
diff --git a/samples/client/petstore/dart-dio/lib/model/pet.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
similarity index 77%
rename from samples/client/petstore/dart-dio/lib/model/pet.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
index 25431aefcb9..cbd2317378f 100644
--- a/samples/client/petstore/dart-dio/lib/model/pet.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/pet.dart
@@ -1,7 +1,7 @@
- import 'package:openapi/model/tag.dart';
- import 'package:built_collection/built_collection.dart';
- import 'package:openapi/model/category.dart';
- import 'package:built_value/built_value.dart';
+import 'package:openapi/model/tag.dart';
+import 'package:built_collection/built_collection.dart';
+import 'package:openapi/model/category.dart';
+import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'pet.g.dart';
@@ -9,30 +9,30 @@ part 'pet.g.dart';
abstract class Pet implements Built {
- @nullable
+ @nullable
@BuiltValueField(wireName: r'id')
int get id;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'category')
Category get category;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'name')
String get name;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'photoUrls')
BuiltList get photoUrls;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'tags')
BuiltList get tags;
/* pet status in the store */
- @nullable
+ @nullable
@BuiltValueField(wireName: r'status')
PetStatus get status;
- //enum statusEnum { available, pending, sold, };
+ // enum statusEnum { available, pending, sold, };
// Boilerplate code needed to wire-up generated code
Pet._();
diff --git a/samples/client/petstore/dart-dio/lib/model/tag.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
similarity index 82%
rename from samples/client/petstore/dart-dio/lib/model/tag.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
index b4f4433ef4b..6ff5d3eb3cd 100644
--- a/samples/client/petstore/dart-dio/lib/model/tag.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/tag.dart
@@ -1,4 +1,4 @@
- import 'package:built_value/built_value.dart';
+import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'tag.g.dart';
@@ -6,11 +6,11 @@ part 'tag.g.dart';
abstract class Tag implements Built {
- @nullable
+ @nullable
@BuiltValueField(wireName: r'id')
int get id;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'name')
String get name;
diff --git a/samples/client/petstore/dart-dio/lib/model/user.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
similarity index 81%
rename from samples/client/petstore/dart-dio/lib/model/user.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
index 0ee8eb03690..cf78ae941ce 100644
--- a/samples/client/petstore/dart-dio/lib/model/user.dart
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/lib/model/user.dart
@@ -1,4 +1,4 @@
- import 'package:built_value/built_value.dart';
+import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'user.g.dart';
@@ -6,35 +6,35 @@ part 'user.g.dart';
abstract class User implements Built {
- @nullable
+ @nullable
@BuiltValueField(wireName: r'id')
int get id;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'username')
String get username;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'firstName')
String get firstName;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'lastName')
String get lastName;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'email')
String get email;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'password')
String get password;
- @nullable
+ @nullable
@BuiltValueField(wireName: r'phone')
String get phone;
/* User Status */
- @nullable
+ @nullable
@BuiltValueField(wireName: r'userStatus')
int get userStatus;
diff --git a/samples/client/petstore/dart-dio/lib/serializers.dart b/samples/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/lib/serializers.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/lib/serializers.dart
diff --git a/samples/client/petstore/dart-dio/petstore_client_lib/pom.xml b/samples/client/petstore/dart-dio/petstore_client_lib/pom.xml
new file mode 100644
index 00000000000..4f661ca5a8d
--- /dev/null
+++ b/samples/client/petstore/dart-dio/petstore_client_lib/pom.xml
@@ -0,0 +1,88 @@
+
+ 4.0.0
+ org.openapitools
+ DartDioPetstoreClientLibOAS2Tests
+ pom
+ 1.0.0-SNAPSHOT
+ DartDio Petstore Client Lib OAS2
+
+
+
+ maven-dependency-plugin
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.2.1
+
+
+ export-dartfmt
+ pre-install-test
+
+ exec
+
+
+ export
+
+ DART_FMT_PATH=/usr/local/bin/dartfmt
+
+
+
+
+ pub-get
+ pre-integration-test
+
+ exec
+
+
+ pub
+
+ get
+
+
+
+
+ pub-run-build-runner
+ pre-integration-test
+
+ exec
+
+
+ pub
+
+ run
+ build_runner
+ build
+
+
+
+
+ pub-test
+ integration-test
+
+ exec
+
+
+ pub
+
+ run
+ test
+
+
+
+
+
+
+
+
diff --git a/samples/client/petstore/dart-dio/pubspec.yaml b/samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml
similarity index 100%
rename from samples/client/petstore/dart-dio/pubspec.yaml
rename to samples/client/petstore/dart-dio/petstore_client_lib/pubspec.yaml
diff --git a/samples/client/petstore/dart-dio/test/api_response_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/api_response_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/api_response_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/api_response_test.dart
diff --git a/samples/client/petstore/dart-dio/test/category_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/category_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/category_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/category_test.dart
diff --git a/samples/client/petstore/dart-dio/test/order_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/order_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/order_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/order_test.dart
diff --git a/samples/client/petstore/dart-dio/test/pet_api_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/pet_api_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/pet_api_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/pet_api_test.dart
diff --git a/samples/client/petstore/dart-dio/test/pet_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/pet_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/pet_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/pet_test.dart
diff --git a/samples/client/petstore/dart-dio/test/store_api_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/store_api_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/store_api_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/store_api_test.dart
diff --git a/samples/client/petstore/dart-dio/test/tag_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/tag_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/tag_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/tag_test.dart
diff --git a/samples/client/petstore/dart-dio/test/user_api_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/user_api_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/user_api_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/user_api_test.dart
diff --git a/samples/client/petstore/dart-dio/test/user_test.dart b/samples/client/petstore/dart-dio/petstore_client_lib/test/user_test.dart
similarity index 100%
rename from samples/client/petstore/dart-dio/test/user_test.dart
rename to samples/client/petstore/dart-dio/petstore_client_lib/test/user_test.dart
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/PetApi.md b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/PetApi.md
deleted file mode 100644
index 3e4ef1cedb2..00000000000
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/PetApi.md
+++ /dev/null
@@ -1,379 +0,0 @@
-# openapi.api.PetApi
-
-## Load the API package
-```dart
-import 'package:openapi/api.dart';
-```
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**addPet**](PetApi.md#addPet) | **Post** /pet | Add a new pet to the store
-[**deletePet**](PetApi.md#deletePet) | **Delete** /pet/:petId | Deletes a pet
-[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **Get** /pet/findByStatus | Finds Pets by status
-[**findPetsByTags**](PetApi.md#findPetsByTags) | **Get** /pet/findByTags | Finds Pets by tags
-[**getPetById**](PetApi.md#getPetById) | **Get** /pet/:petId | Find pet by ID
-[**updatePet**](PetApi.md#updatePet) | **Put** /pet | Update an existing pet
-[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **Post** /pet/:petId | Updates a pet in the store with form data
-[**uploadFile**](PetApi.md#uploadFile) | **Post** /pet/:petId/uploadImage | uploads an image
-
-
-# **addPet**
-> addPet(body)
-
-Add a new pet to the store
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure OAuth2 access token for authorization: petstore_auth
-//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-
-var api_instance = new PetApi();
-var body = new Pet(); // Pet | Pet object that needs to be added to the store
-
-try {
- api_instance.addPet(body);
-} catch (e) {
- print("Exception when calling PetApi->addPet: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: application/json, application/xml
- - **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **deletePet**
-> deletePet(petId, apiKey)
-
-Deletes a pet
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure OAuth2 access token for authorization: petstore_auth
-//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-
-var api_instance = new PetApi();
-var petId = 789; // int | Pet id to delete
-var apiKey = apiKey_example; // String |
-
-try {
- api_instance.deletePet(petId, apiKey);
-} catch (e) {
- print("Exception when calling PetApi->deletePet: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **int**| Pet id to delete | [default to null]
- **apiKey** | **String**| | [optional] [default to null]
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **findPetsByStatus**
-> List findPetsByStatus(status)
-
-Finds Pets by status
-
-Multiple status values can be provided with comma separated strings
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure OAuth2 access token for authorization: petstore_auth
-//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-
-var api_instance = new PetApi();
-var status = []; // List | Status values that need to be considered for filter
-
-try {
- var result = api_instance.findPetsByStatus(status);
- print(result);
-} catch (e) {
- print("Exception when calling PetApi->findPetsByStatus: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [default to const []]
-
-### Return type
-
-[**List**](Pet.md)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **findPetsByTags**
-> List findPetsByTags(tags)
-
-Finds Pets by tags
-
-Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure OAuth2 access token for authorization: petstore_auth
-//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-
-var api_instance = new PetApi();
-var tags = []; // List | Tags to filter by
-
-try {
- var result = api_instance.findPetsByTags(tags);
- print(result);
-} catch (e) {
- print("Exception when calling PetApi->findPetsByTags: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **tags** | [**List<String>**](String.md)| Tags to filter by | [default to const []]
-
-### Return type
-
-[**List**](Pet.md)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **getPetById**
-> Pet getPetById(petId)
-
-Find pet by ID
-
-Returns a single pet
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure API key authorization: api_key
-//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
-// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer";
-
-var api_instance = new PetApi();
-var petId = 789; // int | ID of pet to return
-
-try {
- var result = api_instance.getPetById(petId);
- print(result);
-} catch (e) {
- print("Exception when calling PetApi->getPetById: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **int**| ID of pet to return | [default to null]
-
-### Return type
-
-[**Pet**](Pet.md)
-
-### Authorization
-
-[api_key](../README.md#api_key)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **updatePet**
-> updatePet(body)
-
-Update an existing pet
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure OAuth2 access token for authorization: petstore_auth
-//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-
-var api_instance = new PetApi();
-var body = new Pet(); // Pet | Pet object that needs to be added to the store
-
-try {
- api_instance.updatePet(body);
-} catch (e) {
- print("Exception when calling PetApi->updatePet: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: application/json, application/xml
- - **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **updatePetWithForm**
-> updatePetWithForm(petId, name, status)
-
-Updates a pet in the store with form data
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure OAuth2 access token for authorization: petstore_auth
-//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-
-var api_instance = new PetApi();
-var petId = 789; // int | ID of pet that needs to be updated
-var name = name_example; // String | Updated name of the pet
-var status = status_example; // String | Updated status of the pet
-
-try {
- api_instance.updatePetWithForm(petId, name, status);
-} catch (e) {
- print("Exception when calling PetApi->updatePetWithForm: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **int**| ID of pet that needs to be updated | [default to null]
- **name** | **String**| Updated name of the pet | [optional] [default to null]
- **status** | **String**| Updated status of the pet | [optional] [default to null]
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: application/x-www-form-urlencoded
- - **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **uploadFile**
-> ApiResponse uploadFile(petId, additionalMetadata, file)
-
-uploads an image
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure OAuth2 access token for authorization: petstore_auth
-//openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN';
-
-var api_instance = new PetApi();
-var petId = 789; // int | ID of pet to update
-var additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
-var file = BINARY_DATA_HERE; // MultipartFile | file to upload
-
-try {
- var result = api_instance.uploadFile(petId, additionalMetadata, file);
- print(result);
-} catch (e) {
- print("Exception when calling PetApi->uploadFile: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **petId** | **int**| ID of pet to update | [default to null]
- **additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
- **file** | **MultipartFile****MultipartFile**| file to upload | [optional] [default to null]
-
-### Return type
-
-[**ApiResponse**](ApiResponse.md)
-
-### Authorization
-
-[petstore_auth](../README.md#petstore_auth)
-
-### HTTP request headers
-
- - **Content-Type**: multipart/form-data
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/StoreApi.md b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/StoreApi.md
deleted file mode 100644
index c40c0eff43f..00000000000
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/docs/StoreApi.md
+++ /dev/null
@@ -1,186 +0,0 @@
-# openapi.api.StoreApi
-
-## Load the API package
-```dart
-import 'package:openapi/api.dart';
-```
-
-All URIs are relative to *http://petstore.swagger.io/v2*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**deleteOrder**](StoreApi.md#deleteOrder) | **Delete** /store/order/:orderId | Delete purchase order by ID
-[**getInventory**](StoreApi.md#getInventory) | **Get** /store/inventory | Returns pet inventories by status
-[**getOrderById**](StoreApi.md#getOrderById) | **Get** /store/order/:orderId | Find purchase order by ID
-[**placeOrder**](StoreApi.md#placeOrder) | **Post** /store/order | Place an order for a pet
-
-
-# **deleteOrder**
-> deleteOrder(orderId)
-
-Delete purchase order by ID
-
-For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-
-var api_instance = new StoreApi();
-var orderId = orderId_example; // String | ID of the order that needs to be deleted
-
-try {
- api_instance.deleteOrder(orderId);
-} catch (e) {
- print("Exception when calling StoreApi->deleteOrder: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **orderId** | **String**| ID of the order that needs to be deleted | [default to null]
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: Not defined
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **getInventory**
-> Map getInventory()
-
-Returns pet inventories by status
-
-Returns a map of status codes to quantities
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-// TODO Configure API key authorization: api_key
-//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY';
-// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
-//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer";
-
-var api_instance = new StoreApi();
-
-try {
- var result = api_instance.getInventory();
- print(result);
-} catch (e) {
- print("Exception when calling StoreApi->getInventory: $e\n");
-}
-```
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-**Map**
-
-### Authorization
-
-[api_key](../README.md#api_key)
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **getOrderById**
-> Order getOrderById(orderId)
-
-Find purchase order by ID
-
-For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-
-var api_instance = new StoreApi();
-var orderId = 789; // int | ID of pet that needs to be fetched
-
-try {
- var result = api_instance.getOrderById(orderId);
- print(result);
-} catch (e) {
- print("Exception when calling StoreApi->getOrderById: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **orderId** | **int**| ID of pet that needs to be fetched | [default to null]
-
-### Return type
-
-[**Order**](Order.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **placeOrder**
-> Order placeOrder(body)
-
-Place an order for a pet
-
-### Example
-```dart
-import 'package:openapi/api.dart';
-
-var api_instance = new StoreApi();
-var body = new Order(); // Order | order placed for purchasing the pet
-
-try {
- var result = api_instance.placeOrder(body);
- print(result);
-} catch (e) {
- print("Exception when calling StoreApi->placeOrder: $e\n");
-}
-```
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**Order**](Order.md)| order placed for purchasing the pet |
-
-### Return type
-
-[**Order**](Order.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: Not defined
- - **Accept**: application/xml, application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/api_response_test.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/api_response_test.dart
index ebf142904e9..ba2202d24c4 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/api_response_test.dart
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/api_response_test.dart
@@ -3,7 +3,7 @@ import 'package:test/test.dart';
// tests for ApiResponse
void main() {
- var instance = new Pet();
+ var instance = new ApiResponse();
group('test ApiResponse', () {
// int code (default value: null)
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/category_test.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/category_test.dart
index c5cea4b5bc3..0dcaa8b7977 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/category_test.dart
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/category_test.dart
@@ -3,7 +3,7 @@ import 'package:test/test.dart';
// tests for Category
void main() {
- var instance = new Pet();
+ var instance = new Category();
group('test Category', () {
// int id (default value: null)
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/order_test.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/order_test.dart
index 9982020d8cf..aa9dcc69c4f 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/order_test.dart
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/order_test.dart
@@ -3,7 +3,7 @@ import 'package:test/test.dart';
// tests for Order
void main() {
- var instance = new Pet();
+ var instance = new Order();
group('test Order', () {
// int id (default value: null)
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/pet_api_test.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/pet_api_test.dart
index fa95dccad3c..e9dcc0d83b3 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/pet_api_test.dart
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/pet_api_test.dart
@@ -9,14 +9,14 @@ void main() {
group('tests for PetApi', () {
// Add a new pet to the store
//
- //Future addPet(Pet body) async
+ //Future addPet(Pet body) async
test('test addPet', () async {
// TODO
});
// Deletes a pet
//
- //Future deletePet(int petId, { String apiKey }) async
+ //Future deletePet(int petId, { String apiKey }) async
test('test deletePet', () async {
// TODO
});
@@ -25,7 +25,7 @@ void main() {
//
// Multiple status values can be provided with comma separated strings
//
- //Future> findPetsByStatus(List status) async
+ //Future> findPetsByStatus(List status) async
test('test findPetsByStatus', () async {
// TODO
});
@@ -34,7 +34,7 @@ void main() {
//
// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
//
- //Future> findPetsByTags(List tags) async
+ //Future> findPetsByTags(List tags) async
test('test findPetsByTags', () async {
// TODO
});
@@ -43,28 +43,28 @@ void main() {
//
// Returns a single pet
//
- //Future getPetById(int petId) async
+ //Future getPetById(int petId) async
test('test getPetById', () async {
// TODO
});
// Update an existing pet
//
- //Future updatePet(Pet body) async
+ //Future updatePet(Pet body) async
test('test updatePet', () async {
// TODO
});
// Updates a pet in the store with form data
//
- //Future updatePetWithForm(int petId, { String name, String status }) async
+ //Future updatePetWithForm(int petId, { String name, String status }) async
test('test updatePetWithForm', () async {
// TODO
});
// uploads an image
//
- //Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
+ //Future uploadFile(int petId, { String additionalMetadata, MultipartFile file }) async
test('test uploadFile', () async {
// TODO
});
diff --git a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/store_api_test.dart b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/store_api_test.dart
index 496d051e833..49f763fa098 100644
--- a/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/store_api_test.dart
+++ b/samples/client/petstore/dart-jaguar/flutter_petstore/openapi/test/store_api_test.dart
@@ -11,7 +11,7 @@ void main() {
//
// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
//
- //Future deleteOrder(String orderId) async
+ //Future deleteOrder(String orderId) async
test('test deleteOrder', () async {
// TODO
});
@@ -20,7 +20,7 @@ void main() {
//
// Returns a map of status codes to quantities
//
- //Future