diff --git a/bin/configs/dart-dio-next-petstore-client-lib-fake.yaml b/bin/configs/dart-dio-next-petstore-client-lib-fake.yaml index 830b10ebb75..edcc346a19f 100644 --- a/bin/configs/dart-dio-next-petstore-client-lib-fake.yaml +++ b/bin/configs/dart-dio-next-petstore-client-lib-fake.yaml @@ -2,5 +2,9 @@ generatorName: dart-dio-next outputDir: samples/openapi3/client/petstore/dart-dio-next/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/libraries/dio +typeMappings: + Client: "ModelClient" + File: "ModelFile" + EnumClass: "ModelEnumClass" additionalProperties: hideGenerationTimestamp: "true" diff --git a/bin/configs/dart-dio-petstore-client-lib-fake.yaml b/bin/configs/dart-dio-petstore-client-lib-fake.yaml index 2463da464ed..eca85edfd88 100644 --- a/bin/configs/dart-dio-petstore-client-lib-fake.yaml +++ b/bin/configs/dart-dio-petstore-client-lib-fake.yaml @@ -2,5 +2,9 @@ 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 +typeMappings: + Client: "ModelClient" + File: "ModelFile" + EnumClass: "ModelEnumClass" additionalProperties: hideGenerationTimestamp: "true" diff --git a/bin/configs/dart-petstore-client-lib-fake.yaml b/bin/configs/dart-petstore-client-lib-fake.yaml index 8dda4df4b0a..d48cd8038b7 100644 --- a/bin/configs/dart-petstore-client-lib-fake.yaml +++ b/bin/configs/dart-petstore-client-lib-fake.yaml @@ -2,5 +2,8 @@ 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 +typeMappings: + Client: "ModelClient" + File: "ModelFile" additionalProperties: hideGenerationTimestamp: "true" diff --git a/bin/configs/dart-petstore-json-serializable-client-lib-fake.yaml b/bin/configs/dart-petstore-json-serializable-client-lib-fake.yaml index cb943d3d957..8582a881d51 100644 --- a/bin/configs/dart-petstore-json-serializable-client-lib-fake.yaml +++ b/bin/configs/dart-petstore-json-serializable-client-lib-fake.yaml @@ -2,6 +2,9 @@ generatorName: dart outputDir: samples/openapi3/client/petstore/dart2/petstore_json_serializable_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 +typeMappings: + Client: "ModelClient" + File: "ModelFile" additionalProperties: hideGenerationTimestamp: "true" serializationLibrary: json_serializable diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md index da4fbe4f9a8..d644e35b04a 100644 --- a/docs/generators/dart-dio-next.md +++ b/docs/generators/dart-dio-next.md @@ -44,7 +44,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • String
  • bool
  • double
  • -
  • dynamic
  • int
  • num
  • diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index 767884d7eeb..9368dc7e7fc 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -30,11 +30,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl | Type/Alias | Imports | | ---------- | ------- | -|BuiltList|package:built_collection/built_collection.dart| -|BuiltMap|package:built_collection/built_collection.dart| -|BuiltSet|package:built_collection/built_collection.dart| -|JsonObject|package:built_value/json_object.dart| -|Uint8List|dart:typed_data| ## INSTANTIATION TYPES @@ -49,7 +44,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • String
  • bool
  • double
  • -
  • dynamic
  • int
  • num
  • diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md index d357bae3146..068b5728f02 100644 --- a/docs/generators/dart-jaguar.md +++ b/docs/generators/dart-jaguar.md @@ -44,7 +44,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • String
  • bool
  • double
  • -
  • dynamic
  • int
  • num
  • diff --git a/docs/generators/dart.md b/docs/generators/dart.md index d550256877c..ef805b78451 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -43,7 +43,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
  • String
  • bool
  • double
  • -
  • dynamic
  • int
  • num
  • diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java index 65c6302987d..6cd5d2926e8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java @@ -1,6 +1,7 @@ package org.openapitools.codegen.languages; import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import com.google.common.collect.Sets; import io.swagger.v3.oas.models.Operation; import io.swagger.v3.oas.models.media.ArraySchema; @@ -51,9 +52,7 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { protected String apiTestPath = "test" + File.separator; protected String modelTestPath = "test" + File.separator; - // Names that must not be used as model names because they clash with existing - // default imports (dart:io, dart:async, package:http etc.) but are not basic dataTypes. - protected Set additionalReservedWords; + protected Map imports = new HashMap<>(); public AbstractDartCodegen() { super(); @@ -112,13 +111,13 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { } setReservedWordsLowerCase(reservedWordsList); + // These types return isPrimitive=true in templates languageSpecificPrimitives = Sets.newHashSet( "String", "bool", "int", "num", - "double", - "dynamic" + "double" ); typeMapping = new HashMap<>(); @@ -149,29 +148,31 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { typeMapping.put("object", "Object"); typeMapping.put("AnyType", "Object"); - // DataTypes of the above values which are automatically imported. - // They are also not allowed to be model names. + // Data types of the above values which are automatically imported defaultIncludes = Sets.newHashSet( "String", "bool", "int", "num", "double", - "dynamic", "List", "Set", "Map", "DateTime", - "Object", - "MultipartFile" + "Object" ); - additionalReservedWords = Sets.newHashSet( - "File", - "Client", - "Future", - "Response" - ); + imports.put("String", "dart:core"); + imports.put("bool", "dart:core"); + imports.put("int", "dart:core"); + imports.put("num", "dart:core"); + imports.put("double", "dart:core"); + imports.put("List", "dart:core"); + imports.put("Set", "dart:core"); + imports.put("Map", "dart:core"); + imports.put("DateTime", "dart:core"); + imports.put("Object", "dart:core"); + imports.put("MultipartFile", "package:http/http.dart"); cliOptions.add(new CliOption(PUB_LIBRARY, "Library name in generated code")); cliOptions.add(new CliOption(PUB_NAME, "Name in generated pubspec")); @@ -182,7 +183,6 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { cliOptions.add(new CliOption(PUB_HOMEPAGE, "Homepage in generated pubspec")); cliOptions.add(new CliOption(USE_ENUM_EXTENSION, "Allow the 'x-enum-values' extension for enums")); cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, "Source folder for generated code")); - } @Override @@ -279,13 +279,17 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { } } + @Override + protected boolean needToImport(String type) { + // Import everything, unless it is from dart:core. + return StringUtils.isNotBlank(type) && (!imports.containsKey(type) || !imports.get(type).equals("dart:core")); + } + @Override protected boolean isReservedWord(String word) { // consider everything as reserved that is either a keyword, // a default included type, or a type include through some library - return super.isReservedWord(word) || - defaultIncludes().contains(word) || - additionalReservedWords.contains(word); + return super.isReservedWord(word) || defaultIncludes().contains(word); } @Override @@ -367,20 +371,34 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { @Override public String toModelName(final String name) { - String nameWithPrefixSuffix = sanitizeName(name); + String sanitizedName = sanitizeName(name); + if (!StringUtils.isEmpty(modelNamePrefix)) { // add '_' so that model name can be camelized correctly - nameWithPrefixSuffix = modelNamePrefix + "_" + nameWithPrefixSuffix; + sanitizedName = modelNamePrefix + "_" + sanitizedName; } if (!StringUtils.isEmpty(modelNameSuffix)) { // add '_' so that model name can be camelized correctly - nameWithPrefixSuffix = nameWithPrefixSuffix + "_" + modelNameSuffix; + sanitizedName = sanitizedName + "_" + modelNameSuffix; } // camelize the model name // phone_number => PhoneNumber - final String camelizedName = camelize(nameWithPrefixSuffix); + final String camelizedName = camelize(sanitizedName); + + // Check if there is a mapping that can be used + if (typeMapping().containsKey(camelizedName)) { + String typeName = typeMapping().get(camelizedName); + if (imports.containsKey(typeName)) { + // Anything with an import mapping is likely + // generator specific and can not be used as model name. + final String modelName = "Model" + camelizedName; + LOGGER.warn("{} (existing type) cannot be used as model name. Renamed to {}", camelizedName, modelName); + return modelName; + } + return typeName; + } // model name cannot use reserved keyword, e.g. return if (isReservedWord(camelizedName)) { @@ -473,11 +491,8 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { if (openAPIType == null) { LOGGER.error("No Type defined for Schema {}", p); } - if (typeMapping.containsKey(openAPIType)) { - return typeMapping.get(openAPIType); - } - if (languageSpecificPrimitives.contains(openAPIType)) { - return openAPIType; + if (typeMapping().containsKey(openAPIType)) { + return typeMapping().get(openAPIType); } return toModelName(openAPIType); } @@ -607,8 +622,9 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { // operationId starts with a number if (operationId.matches("^\\d.*")) { - LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, camelize("call_" + operationId), true); - operationId = camelize("call_" + operationId, true); + String newOperationId = camelize("call_" + operationId, true); + LOGGER.warn("{} (starting with a number) cannot be used as method name. Renamed to {}", operationId, newOperationId); + operationId = newOperationId; } return operationId; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java index 59578099cce..589ef137f34 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartClientCodegen.java @@ -37,20 +37,6 @@ public class DartClientCodegen extends AbstractDartCodegen { public DartClientCodegen() { super(); - - additionalReservedWords.addAll( - Sets.newHashSet( - "StreamedRequest", - "ApiClient", - "QueryParam", - "Authentication", - "HttpBasicAuth", - "HttpBearerAuth", - "ApiKeyAuth", - "OAuth" - ) - ); - final CliOption serializationLibrary = CliOption.newString(CodegenConstants.SERIALIZATION_LIBRARY, "Specify serialization library"); serializationLibrary.setDefault(SERIALIZATION_LIBRARY_NATIVE); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index a0bafd5e8ac..23b50b2f756 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java @@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; +import java.util.stream.Collectors; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -77,22 +78,11 @@ public class DartDioClientCodegen extends AbstractDartCodegen { typeMapping.put("object", "JsonObject"); typeMapping.put("AnyType", "JsonObject"); - additionalReservedWords.addAll(Sets.newHashSet( - "EnumClass", - // The following are reserved dataTypes but can not be added to defaultIncludes - // as this would prevent them from being added to the imports. - "BuiltList", - "BuiltSet", - "BuiltMap", - "Uint8List", - "JsonObject" - )); - - importMapping.put("BuiltList", "package:built_collection/built_collection.dart"); - importMapping.put("BuiltSet", "package:built_collection/built_collection.dart"); - importMapping.put("BuiltMap", "package:built_collection/built_collection.dart"); - importMapping.put("JsonObject", "package:built_value/json_object.dart"); - importMapping.put("Uint8List", "dart:typed_data"); + imports.put("BuiltList", "package:built_collection/built_collection.dart"); + imports.put("BuiltSet", "package:built_collection/built_collection.dart"); + imports.put("BuiltMap", "package:built_collection/built_collection.dart"); + imports.put("JsonObject", "package:built_value/json_object.dart"); + imports.put("Uint8List", "dart:typed_data"); } public String getDateLibrary() { @@ -210,9 +200,8 @@ public class DartDioClientCodegen extends AbstractDartCodegen { typeMapping.put("Date", "OffsetDate"); typeMapping.put("DateTime", "OffsetDateTime"); typeMapping.put("datetime", "OffsetDateTime"); - additionalReservedWords.addAll(Sets.newHashSet("OffsetDate", "OffsetDateTime")); - importMapping.put("OffsetDate", "package:time_machine/time_machine.dart"); - importMapping.put("OffsetDateTime", "package:time_machine/time_machine.dart"); + imports.put("OffsetDate", "package:time_machine/time_machine.dart"); + imports.put("OffsetDateTime", "package:time_machine/time_machine.dart"); supportingFiles.add(new SupportingFile("local_date_serializer.mustache", libFolder, "local_date_serializer.dart")); } } @@ -225,21 +214,9 @@ public class DartDioClientCodegen extends AbstractDartCodegen { for (Object _mo : models) { Map mo = (Map) _mo; - Set modelImports = new HashSet<>(); CodegenModel cm = (CodegenModel) mo.get("model"); - for (String modelImport : cm.imports) { - if (needToImport(modelImport)) { - if (importMapping().containsKey(modelImport)) { - modelImports.add(importMapping().get(modelImport)); - } else { - modelImports.add("package:" + pubName + "/model/" + underscore(modelImport) + ".dart"); - } - } - } - - cm.imports = modelImports; - boolean hasVars = cm.vars.size() > 0; - cm.vendorExtensions.put("x-has-vars", hasVars); + cm.imports = rewriteImports(cm.imports); + cm.vendorExtensions.put("x-has-vars", !cm.vars.isEmpty()); } return objs; } @@ -292,8 +269,7 @@ public class DartDioClientCodegen extends AbstractDartCodegen { List operationList = (List) operations.get("operation"); Set> serializers = new HashSet<>(); - Set modelImports = new HashSet<>(); - Set fullImports = new HashSet<>(); + Set resultImports = new HashSet<>(); for (CodegenOperation op : operationList) { op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); @@ -331,23 +307,11 @@ public class DartDioClientCodegen extends AbstractDartCodegen { op.vendorExtensions.put("x-is-form", isForm); op.vendorExtensions.put("x-is-multipart", isMultipart); + resultImports.addAll(rewriteImports(op.imports)); if (op.getHasFormParams()) { - fullImports.add("package:" + pubName + "/api_util.dart"); + resultImports.add("package:" + pubName + "/api_util.dart"); } - Set imports = new HashSet<>(); - for (String item : op.imports) { - if (needToImport(item)) { - if (importMapping().containsKey(item)) { - fullImports.add(importMapping().get(item)); - } else { - imports.add(underscore(item)); - } - } - } - modelImports.addAll(imports); - op.imports = imports; - if (op.returnContainer != null) { final Map serializer = new HashMap<>(); serializer.put("isArray", Objects.equals("array", op.returnContainer) || Objects.equals("set", op.returnContainer)); @@ -358,11 +322,21 @@ public class DartDioClientCodegen extends AbstractDartCodegen { } } - objs.put("modelImports", modelImports); - objs.put("fullImports", fullImports); + objs.put("imports", resultImports.stream().sorted().collect(Collectors.toList())); objs.put("serializers", serializers); return objs; } + private Set rewriteImports(Set originalImports) { + Set resultImports = Sets.newHashSet(); + for (String modelImport : originalImports) { + if (imports.containsKey(modelImport)) { + resultImports.add(imports.get(modelImport)); + } else { + resultImports.add("package:" + pubName + "/model/" + underscore(modelImport) + ".dart"); + } + } + return resultImports; + } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java index 7034bc4bece..ee1fbb9d261 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioNextClientCodegen.java @@ -30,6 +30,7 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.util.*; +import java.util.stream.Collectors; import static org.openapitools.codegen.utils.StringUtils.underscore; @@ -186,22 +187,11 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { typeMapping.put("object", "JsonObject"); typeMapping.put("AnyType", "JsonObject"); - additionalReservedWords.addAll(Sets.newHashSet( - "EnumClass", - // The following are reserved dataTypes but can not be added to defaultIncludes - // as this would prevent them from being added to the imports. - "BuiltList", - "BuiltSet", - "BuiltMap", - "Uint8List", - "JsonObject" - )); - - importMapping.put("BuiltList", "package:built_collection/built_collection.dart"); - importMapping.put("BuiltSet", "package:built_collection/built_collection.dart"); - importMapping.put("BuiltMap", "package:built_collection/built_collection.dart"); - importMapping.put("JsonObject", "package:built_value/json_object.dart"); - importMapping.put("Uint8List", "dart:typed_data"); + imports.put("BuiltList", "package:built_collection/built_collection.dart"); + imports.put("BuiltSet", "package:built_collection/built_collection.dart"); + imports.put("BuiltMap", "package:built_collection/built_collection.dart"); + imports.put("JsonObject", "package:built_value/json_object.dart"); + imports.put("Uint8List", "dart:typed_data"); } private void configureDateLibrary(String srcFolder) { @@ -212,9 +202,8 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { typeMapping.put("Date", "OffsetDate"); typeMapping.put("DateTime", "OffsetDateTime"); typeMapping.put("datetime", "OffsetDateTime"); - additionalReservedWords.addAll(Sets.newHashSet("OffsetDate", "OffsetDateTime")); - importMapping.put("OffsetDate", "package:time_machine/time_machine.dart"); - importMapping.put("OffsetDateTime", "package:time_machine/time_machine.dart"); + imports.put("OffsetDate", "package:time_machine/time_machine.dart"); + imports.put("OffsetDateTime", "package:time_machine/time_machine.dart"); if (SERIALIZATION_LIBRARY_BUILT_VALUE.equals(library)) { supportingFiles.add(new SupportingFile("serialization/built_value/local_date_serializer.mustache", srcFolder, "local_date_serializer.dart")); } @@ -261,21 +250,9 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { for (Object _mo : models) { Map mo = (Map) _mo; - Set modelImports = new HashSet<>(); CodegenModel cm = (CodegenModel) mo.get("model"); - for (String modelImport : cm.imports) { - if (needToImport(modelImport)) { - if (importMapping().containsKey(modelImport)) { - modelImports.add(importMapping().get(modelImport)); - } else { - modelImports.add("package:" + pubName + "/src/model/" + underscore(modelImport) + ".dart"); - } - } - } - - cm.imports = modelImports; - boolean hasVars = cm.vars.size() > 0; - cm.vendorExtensions.put("x-has-vars", hasVars); + cm.imports = rewriteImports(cm.imports); + cm.vendorExtensions.put("x-has-vars", !cm.vars.isEmpty()); } return objs; } @@ -319,6 +296,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { sb.append(")]"); } + @Override public Map postProcessOperationsWithModels(Map objs, List allModels) { objs = super.postProcessOperationsWithModels(objs, allModels); @@ -326,8 +304,7 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { List operationList = (List) operations.get("operation"); Set> serializers = new HashSet<>(); - Set modelImports = new HashSet<>(); - Set fullImports = new HashSet<>(); + Set resultImports = new HashSet<>(); for (CodegenOperation op : operationList) { op.httpMethod = op.httpMethod.toLowerCase(Locale.ROOT); @@ -365,23 +342,11 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { op.vendorExtensions.put("x-is-form", isForm); op.vendorExtensions.put("x-is-multipart", isMultipart); + resultImports.addAll(rewriteImports(op.imports)); if (op.getHasFormParams()) { - fullImports.add("package:" + pubName + "/src/api_util.dart"); + resultImports.add("package:" + pubName + "/src/api_util.dart"); } - Set imports = new HashSet<>(); - for (String item : op.imports) { - if (needToImport(item)) { - if (importMapping().containsKey(item)) { - fullImports.add(importMapping().get(item)); - } else { - imports.add(underscore(item)); - } - } - } - modelImports.addAll(imports); - op.imports = imports; - if (op.returnContainer != null) { final Map serializer = new HashMap<>(); serializer.put("isArray", Objects.equals("array", op.returnContainer) || Objects.equals("set", op.returnContainer)); @@ -392,11 +357,21 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen { } } - objs.put("modelImports", modelImports); - objs.put("fullImports", fullImports); + objs.put("imports", resultImports.stream().sorted().collect(Collectors.toList())); objs.put("serializers", serializers); return objs; } + private Set rewriteImports(Set originalImports) { + Set resultImports = Sets.newHashSet(); + for (String modelImport : originalImports) { + if (imports.containsKey(modelImport)) { + resultImports.add(imports.get(modelImport)); + } else { + resultImports.add("package:" + pubName + "/src/model/" + underscore(modelImport) + ".dart"); + } + } + return resultImports; + } } diff --git a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache index 38f4deb96f8..dff1dcd4235 100644 --- a/modules/openapi-generator/src/main/resources/dart-dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart-dio/api.mustache @@ -4,10 +4,8 @@ import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; {{#operations}} -{{#modelImports}}import 'package:{{pubName}}/model/{{.}}.dart'; -{{/modelImports}} -{{#fullImports}}import '{{.}}'; -{{/fullImports}} +{{#imports}}import '{{.}}'; +{{/imports}} class {{classname}} { diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache index 8deca6ce000..34cf9554991 100644 --- a/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache +++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/api.mustache @@ -5,10 +5,8 @@ import 'dart:async'; import 'package:dio/dio.dart'; {{#operations}} -{{#modelImports}}import 'package:{{pubName}}/src/model/{{.}}.dart'; -{{/modelImports}} -{{#fullImports}}import '{{.}}'; -{{/fullImports}} +{{#imports}}import '{{.}}'; +{{/imports}} class {{classname}} { diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java index 36daa8b1335..5d76dbcac8e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartModelTest.java @@ -337,8 +337,8 @@ public class DartModelTest { {"sample name", "SampleName"}, {"List", "ModelList"}, {"list", "ModelList"}, - {"File", "ModelFile"}, - {"Client", "ModelClient"}, + {"File", "TestModelFile"}, + {"Client", "TestModelClient"}, {"String", "ModelString"}, }; } @@ -349,6 +349,8 @@ public class DartModelTest { final Schema model = new Schema(); final DefaultCodegen codegen = new DartClientCodegen(); codegen.setOpenAPI(openAPI); + codegen.typeMapping().put("File", "TestModelFile"); + codegen.typeMapping().put("Client", "TestModelClient"); final CodegenModel cm = codegen.fromModel(name, model); Assert.assertEquals(cm.name, name); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java index 95449c3edb9..d645046b2df 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioModelTest.java @@ -380,10 +380,8 @@ public class DartDioModelTest { @DataProvider(name = "modelNames") public static Object[][] modelNames() { return new Object[][] { - {"EnumClass", "ModelEnumClass"}, - {"JsonObject", "ModelJsonObject"}, - // OffsetDate is valid without timemachine date library - {"OffsetDate", "OffsetDate"}, + {"EnumClass", "TestModelEnumClass"}, + {"JsonObject", "TestModelJsonObject"} }; } @@ -393,6 +391,8 @@ public class DartDioModelTest { final Schema model = new Schema(); final DartDioClientCodegen codegen = new DartDioClientCodegen(); codegen.setOpenAPI(openAPI); + codegen.typeMapping().put("EnumClass", "TestModelEnumClass"); + codegen.typeMapping().put("JsonObject", "TestModelJsonObject"); final CodegenModel cm = codegen.fromModel(name, model); Assert.assertEquals(cm.name, name); @@ -402,10 +402,9 @@ public class DartDioModelTest { @DataProvider(name = "modelNamesTimemachine") public static Object[][] modelNamesTimemachine() { return new Object[][] { - {"EnumClass", "ModelEnumClass"}, - {"JsonObject", "ModelJsonObject"}, - // OffsetDate is not valid with timemachine date library - {"OffsetDate", "ModelOffsetDate"}, + {"EnumClass", "TestModelEnumClass"}, + {"JsonObject", "TestModelJsonObject"}, + {"OffsetDate", "TestModelOffsetDate"}, }; } @@ -416,6 +415,9 @@ public class DartDioModelTest { final DartDioClientCodegen codegen = new DartDioClientCodegen(); codegen.setDateLibrary("timemachine"); codegen.processOpts(); + codegen.typeMapping().put("EnumClass", "TestModelEnumClass"); + codegen.typeMapping().put("JsonObject", "TestModelJsonObject"); + codegen.typeMapping().put("OffsetDate", "TestModelOffsetDate"); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel(name, model); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextModelTest.java index 1190240faa0..4eefae4e418 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioNextModelTest.java @@ -390,10 +390,8 @@ public class DartDioNextModelTest { @DataProvider(name = "modelNames") public static Object[][] modelNames() { return new Object[][] { - {"EnumClass", "ModelEnumClass"}, - {"JsonObject", "ModelJsonObject"}, - // OffsetDate is valid without timemachine date library - {"OffsetDate", "OffsetDate"}, + {"EnumClass", "TestModelEnumClass"}, + {"JsonObject", "TestModelJsonObject"}, }; } @@ -405,7 +403,8 @@ public class DartDioNextModelTest { final DefaultCodegen codegen = new DartDioNextClientCodegen(); codegen.additionalProperties().put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioNextClientCodegen.SERIALIZATION_LIBRARY_BUILT_VALUE); codegen.processOpts(); - + codegen.typeMapping().put("EnumClass", "TestModelEnumClass"); + codegen.typeMapping().put("JsonObject", "TestModelJsonObject"); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel(name, model); @@ -417,10 +416,9 @@ public class DartDioNextModelTest { @DataProvider(name = "modelNamesTimemachine") public static Object[][] modelNamesTimemachine() { return new Object[][] { - {"EnumClass", "ModelEnumClass"}, - {"JsonObject", "ModelJsonObject"}, - // OffsetDate is not valid with timemachine date library - {"OffsetDate", "ModelOffsetDate"}, + {"EnumClass", "TestModelEnumClass"}, + {"JsonObject", "TestModelJsonObject"}, + {"OffsetDate", "TestModelOffsetDate"}, }; } @@ -431,7 +429,11 @@ public class DartDioNextModelTest { final DartDioNextClientCodegen codegen = new DartDioNextClientCodegen(); codegen.additionalProperties().put(DartDioNextClientCodegen.DATE_LIBRARY, DartDioNextClientCodegen.DATE_LIBRARY_TIME_MACHINE); codegen.processOpts(); + codegen.typeMapping().put("EnumClass", "TestModelEnumClass"); + codegen.typeMapping().put("JsonObject", "TestModelJsonObject"); + codegen.typeMapping().put("OffsetDate", "TestModelOffsetDate"); codegen.setOpenAPI(openAPI); + final CodegenModel cm = codegen.fromModel(name, model); Assert.assertEquals(cm.name, name); diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/fake_api.dart index 8718f97fb60..3a9501cca3f 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -7,16 +7,16 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; -import 'package:openapi/src/model/file_schema_test_class.dart'; -import 'package:openapi/src/model/outer_composite.dart'; -import 'package:openapi/src/model/outer_object_with_enum_property.dart'; -import 'package:openapi/src/model/user.dart'; -import 'package:openapi/src/model/health_check_result.dart'; -import 'package:openapi/src/model/pet.dart'; -import 'package:openapi/src/model/model_client.dart'; -import 'package:openapi/src/api_util.dart'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/file_schema_test_class.dart'; +import 'package:openapi/src/model/health_check_result.dart'; +import 'package:openapi/src/model/model_client.dart'; +import 'package:openapi/src/model/outer_composite.dart'; +import 'package:openapi/src/model/outer_object_with_enum_property.dart'; +import 'package:openapi/src/model/pet.dart'; +import 'package:openapi/src/model/user.dart'; class FakeApi { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/pet_api.dart index da4b3a61a67..219b0cecd26 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -7,11 +7,11 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; -import 'package:openapi/src/model/pet.dart'; -import 'package:openapi/src/model/api_response.dart'; -import 'package:openapi/src/api_util.dart'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/api_response.dart'; +import 'package:openapi/src/model/pet.dart'; class PetApi { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/store_api.dart index 36bf3a5d680..0c0b9f44794 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/store_api.dart @@ -7,8 +7,8 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; -import 'package:openapi/src/model/order.dart'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/order.dart'; class StoreApi { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/user_api.dart index e07516cb32e..c0551df5e51 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/lib/src/api/user_api.dart @@ -7,8 +7,8 @@ import 'dart:async'; import 'package:built_value/serializer.dart'; import 'package:dio/dio.dart'; -import 'package:openapi/src/model/user.dart'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/user.dart'; class UserApi { diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/additional_properties_class_test.dart index 0ee0559d710..c231e6dc280 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/additional_properties_class_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/additional_properties_class_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `mapOfMapProperty`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/animal_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/animal_test.dart index 5abb8c230ad..875bb42a106 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/animal_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/animal_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `color`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/another_fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/another_fake_api_test.dart index b758bba36ae..ddafef2a831 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/another_fake_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/another_fake_api_test.dart @@ -1,6 +1,7 @@ import 'package:test/test.dart'; import 'package:openapi/openapi.dart'; + /// tests for AnotherFakeApi void main() { final instance = Openapi().getAnotherFakeApi(); @@ -14,5 +15,6 @@ void main() { test('test call123testSpecialTags', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/api_response_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/api_response_test.dart index 9587579a4ab..cf1a744cd62 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/api_response_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/api_response_test.dart @@ -21,5 +21,6 @@ void main() { test('to test the property `message`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart index ad6d165e3c8..a679a6c4223 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_of_array_of_number_only_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `arrayArrayNumber`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_of_number_only_test.dart index 456681ced45..cc648bc115c 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_of_number_only_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_of_number_only_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `arrayNumber`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_test_test.dart index 7b89588b215..210216f224b 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_test_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/array_test_test.dart @@ -21,5 +21,6 @@ void main() { test('to test the property `arrayArrayOfModel`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/capitalization_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/capitalization_test.dart index c1fb9cd73dc..23e04b0001b 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/capitalization_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/capitalization_test.dart @@ -32,10 +32,11 @@ void main() { // TODO }); - // Name of the pet + // Name of the pet // String ATT_NAME test('to test the property `ATT_NAME`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/cat_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/cat_all_of_test.dart index 8dd99ed27ae..afdac82ad18 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/cat_all_of_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/cat_all_of_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `declawed`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/cat_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/cat_test.dart index 000e31d7f17..b8fc252acc6 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/cat_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/cat_test.dart @@ -21,5 +21,6 @@ void main() { test('to test the property `declawed`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/category_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/category_test.dart index c484b83670e..70f5fb5e02a 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/category_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/category_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `name`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/class_model_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/class_model_test.dart index 4e19175e4c7..92f95f186c9 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/class_model_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/class_model_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `class_`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/default_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/default_api_test.dart index 9be0a9ea307..eef4c41652e 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/default_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/default_api_test.dart @@ -1,6 +1,7 @@ import 'package:test/test.dart'; import 'package:openapi/openapi.dart'; + /// tests for DefaultApi void main() { final instance = Openapi().getDefaultApi(); @@ -10,5 +11,6 @@ void main() { test('test fooGet', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/dog_all_of_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/dog_all_of_test.dart index a14ae377677..7b58b3a2755 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/dog_all_of_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/dog_all_of_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `breed`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/dog_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/dog_test.dart index 0d810b3b9fa..f57fcdc413d 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/dog_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/dog_test.dart @@ -21,5 +21,6 @@ void main() { test('to test the property `breed`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/enum_arrays_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/enum_arrays_test.dart index c0d5de925ae..438c36db074 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/enum_arrays_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/enum_arrays_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `arrayEnum`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/enum_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/enum_test_test.dart index d7dc20b5eb7..b5f3aeb7fbd 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/enum_test_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/enum_test_test.dart @@ -46,5 +46,6 @@ void main() { test('to test the property `outerEnumIntegerDefaultValue`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/fake_api_test.dart index b51650dc3fb..961e7a5cec7 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/fake_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/fake_api_test.dart @@ -1,6 +1,7 @@ import 'package:test/test.dart'; import 'package:openapi/openapi.dart'; + /// tests for FakeApi void main() { final instance = Openapi().getFakeApi(); @@ -76,9 +77,9 @@ void main() { // TODO }); - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 // - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 // //Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, Uint8List binary, DateTime date, DateTime dateTime, String password, String callback }) async test('test testEndpointParameters', () async { @@ -123,5 +124,6 @@ void main() { test('test testQueryParameterCollectionFormat', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart index 979c752e1c2..3075147f52f 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/fake_classname_tags123_api_test.dart @@ -1,6 +1,7 @@ import 'package:test/test.dart'; import 'package:openapi/openapi.dart'; + /// tests for FakeClassnameTags123Api void main() { final instance = Openapi().getFakeClassnameTags123Api(); @@ -14,5 +15,6 @@ void main() { test('test testClassname', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/file_schema_test_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/file_schema_test_class_test.dart index 1ef8cf8861b..ca8695bd4a4 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/file_schema_test_class_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/file_schema_test_class_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `files`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/foo_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/foo_test.dart index f840bcda0d1..205237788ae 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/foo_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/foo_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `bar`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/format_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/format_test_test.dart index c2fdf962cb0..78f599fb051 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/format_test_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/format_test_test.dart @@ -88,5 +88,6 @@ void main() { test('to test the property `patternWithDigitsAndDelimiter`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/has_only_read_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/has_only_read_only_test.dart index 8b00db3d071..c3452221475 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/has_only_read_only_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/has_only_read_only_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `foo`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/health_check_result_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/health_check_result_test.dart index 050e2c9b814..fda0c921821 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/health_check_result_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/health_check_result_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `nullableMessage`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/inline_response_default_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/inline_response_default_test.dart index 669478bbc5d..56fbf1d0b1a 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/inline_response_default_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/inline_response_default_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `string`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/map_test_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/map_test_test.dart index 56c3d448c6c..56a27610ee5 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/map_test_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/map_test_test.dart @@ -26,5 +26,6 @@ void main() { test('to test the property `indirectMap`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart index dcaa8d351ae..85b113387a0 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/mixed_properties_and_additional_properties_class_test.dart @@ -21,5 +21,6 @@ void main() { test('to test the property `map`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model200_response_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model200_response_test.dart index b65bd140762..39ff6ec59c0 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model200_response_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model200_response_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `class_`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_client_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_client_test.dart index 1998f27d715..f494dfd0849 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_client_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_client_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `client`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_enum_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_enum_class_test.dart index fa31f816801..03e5855bf00 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_enum_class_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_enum_class_test.dart @@ -3,5 +3,7 @@ import 'package:openapi/openapi.dart'; // tests for ModelEnumClass void main() { - group(ModelEnumClass, () {}); + + group(ModelEnumClass, () { + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_file_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_file_test.dart index a07c60c5d85..4f139772622 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_file_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_file_test.dart @@ -12,5 +12,6 @@ void main() { test('to test the property `sourceURI`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_list_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_list_test.dart index 0c4e3c45c7a..d35e02fe0c9 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_list_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_list_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `n123list`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_return_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_return_test.dart index b60abdfd602..eedfe7eb281 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_return_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/model_return_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `return_`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/name_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/name_test.dart index d04e76fef9e..6b2329bb081 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/name_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/name_test.dart @@ -26,5 +26,6 @@ void main() { test('to test the property `n123number`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/nullable_class_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/nullable_class_test.dart index 4bc622df0dd..a174a90621d 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/nullable_class_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/nullable_class_test.dart @@ -66,5 +66,6 @@ void main() { test('to test the property `objectItemsNullable`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/number_only_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/number_only_test.dart index 7f34d2a5ce6..7167d78a496 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/number_only_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/number_only_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `justNumber`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/order_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/order_test.dart index 3ed96043d80..7ff992230bf 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/order_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/order_test.dart @@ -37,5 +37,6 @@ void main() { test('to test the property `complete`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_composite_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_composite_test.dart index 99a7cb7db59..dac257d9a0d 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_composite_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_composite_test.dart @@ -21,5 +21,6 @@ void main() { test('to test the property `myBoolean`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_default_value_test.dart index a5c83f61519..502c8326be5 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_default_value_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_default_value_test.dart @@ -3,5 +3,7 @@ import 'package:openapi/openapi.dart'; // tests for OuterEnumDefaultValue void main() { - group(OuterEnumDefaultValue, () {}); + + group(OuterEnumDefaultValue, () { + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart index 49ebbfcead7..c535fe8ac35 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_integer_default_value_test.dart @@ -3,5 +3,7 @@ import 'package:openapi/openapi.dart'; // tests for OuterEnumIntegerDefaultValue void main() { - group(OuterEnumIntegerDefaultValue, () {}); + + group(OuterEnumIntegerDefaultValue, () { + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_integer_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_integer_test.dart index 3c6b81305c7..d945bc8c489 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_integer_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_integer_test.dart @@ -3,5 +3,7 @@ import 'package:openapi/openapi.dart'; // tests for OuterEnumInteger void main() { - group(OuterEnumInteger, () {}); + + group(OuterEnumInteger, () { + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_test.dart index 4ee10f379d5..8e11eb02fb8 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_enum_test.dart @@ -3,5 +3,7 @@ import 'package:openapi/openapi.dart'; // tests for OuterEnum void main() { - group(OuterEnum, () {}); + + group(OuterEnum, () { + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart index cb621828cbc..d6d763c5d93 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/outer_object_with_enum_property_test.dart @@ -11,5 +11,6 @@ void main() { test('to test the property `value`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/pet_api_test.dart index 8b7c576988d..99e9a07b97c 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/pet_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/pet_api_test.dart @@ -1,6 +1,7 @@ import 'package:test/test.dart'; import 'package:openapi/openapi.dart'; + /// tests for PetApi void main() { final instance = Openapi().getPetApi(); @@ -74,5 +75,6 @@ void main() { test('test uploadFileWithRequiredFile', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/pet_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/pet_test.dart index 7d57000d4d9..b2bac5351d2 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/pet_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/pet_test.dart @@ -37,5 +37,6 @@ void main() { test('to test the property `status`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/read_only_first_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/read_only_first_test.dart index f4652322f2c..550d3d793ec 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/read_only_first_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/read_only_first_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `baz`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/special_model_name_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/special_model_name_test.dart index f81e03f7188..08a4592a1ed 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/special_model_name_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/special_model_name_test.dart @@ -8,10 +8,9 @@ void main() { group(SpecialModelName, () { // int dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket - test( - 'to test the property `dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket`', - () async { + test('to test the property `dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/store_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/store_api_test.dart index 98046d8a635..9eac725762b 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/store_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/store_api_test.dart @@ -1,6 +1,7 @@ import 'package:test/test.dart'; import 'package:openapi/openapi.dart'; + /// tests for StoreApi void main() { final instance = Openapi().getStoreApi(); @@ -39,5 +40,6 @@ void main() { test('test placeOrder', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/tag_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/tag_test.dart index 253a283fc86..6f7c63b8f0c 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/tag_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/tag_test.dart @@ -16,5 +16,6 @@ void main() { test('to test the property `name`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/user_api_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/user_api_test.dart index 0009ec07b4b..01eaad61fc2 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/user_api_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/user_api_test.dart @@ -1,6 +1,7 @@ import 'package:test/test.dart'; import 'package:openapi/openapi.dart'; + /// tests for UserApi void main() { final instance = Openapi().getUserApi(); @@ -67,5 +68,6 @@ void main() { test('test updateUser', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/user_test.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/user_test.dart index 40bef6e6d21..1e6a1bc23fa 100644 --- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/user_test.dart +++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/test/user_test.dart @@ -47,5 +47,6 @@ void main() { test('to test the property `userStatus`', () async { // TODO }); + }); } diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart index 359af60f452..9b378a4b3fa 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/pet_api.dart @@ -9,11 +9,11 @@ import 'dart:async'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; -import 'package:openapi/model/pet.dart'; -import 'package:openapi/model/api_response.dart'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; import 'package:openapi/api_util.dart'; +import 'package:openapi/model/api_response.dart'; +import 'package:openapi/model/pet.dart'; class PetApi { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart index f79948b6696..d0184f6eda8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/store_api.dart @@ -9,8 +9,8 @@ import 'dart:async'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; -import 'package:openapi/model/order.dart'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/model/order.dart'; class StoreApi { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart index 5dca5b99405..5253ac66028 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/lib/api/user_api.dart @@ -9,8 +9,8 @@ import 'dart:async'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; -import 'package:openapi/model/user.dart'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/model/user.dart'; class UserApi { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart index 6264437cbab..b50d02d5cf6 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/fake_api.dart @@ -9,16 +9,16 @@ import 'dart:async'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; -import 'package:openapi/model/file_schema_test_class.dart'; -import 'package:openapi/model/outer_composite.dart'; -import 'package:openapi/model/outer_object_with_enum_property.dart'; -import 'package:openapi/model/user.dart'; -import 'package:openapi/model/health_check_result.dart'; -import 'package:openapi/model/pet.dart'; -import 'package:openapi/model/model_client.dart'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; import 'package:openapi/api_util.dart'; +import 'package:openapi/model/file_schema_test_class.dart'; +import 'package:openapi/model/health_check_result.dart'; +import 'package:openapi/model/model_client.dart'; +import 'package:openapi/model/outer_composite.dart'; +import 'package:openapi/model/outer_object_with_enum_property.dart'; +import 'package:openapi/model/pet.dart'; +import 'package:openapi/model/user.dart'; class FakeApi { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart index 8321b2bd1ec..56bdd8556bc 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/pet_api.dart @@ -9,11 +9,11 @@ import 'dart:async'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; -import 'package:openapi/model/pet.dart'; -import 'package:openapi/model/api_response.dart'; import 'dart:typed_data'; import 'package:built_collection/built_collection.dart'; import 'package:openapi/api_util.dart'; +import 'package:openapi/model/api_response.dart'; +import 'package:openapi/model/pet.dart'; class PetApi { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart index bb497732830..e6c7679d1cd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/store_api.dart @@ -9,8 +9,8 @@ import 'dart:async'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; -import 'package:openapi/model/order.dart'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/model/order.dart'; class StoreApi { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart index 190e4bcb405..d85fbcc8585 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/api/user_api.dart @@ -9,8 +9,8 @@ import 'dart:async'; import 'package:dio/dio.dart'; import 'package:built_value/serializer.dart'; -import 'package:openapi/model/user.dart'; import 'package:built_collection/built_collection.dart'; +import 'package:openapi/model/user.dart'; class UserApi {