diff --git a/.github/workflows/samples-dart.yaml b/.github/workflows/samples-dart.yaml
index fd78f8a6d912..229b0c488132 100644
--- a/.github/workflows/samples-dart.yaml
+++ b/.github/workflows/samples-dart.yaml
@@ -40,7 +40,7 @@ jobs:
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('samples/**/pubspec.yaml') }}
- uses: dart-lang/setup-dart@v1
with:
- sdk: 2.13.0
+ sdk: 2.14.0
- name: Run tests
uses: ./.github/actions/run-samples
with:
diff --git a/bin/configs/dart-dio-next-petstore-client-lib-fake-json_serializable.yaml b/bin/configs/dart-dio-next-petstore-client-lib-fake-json_serializable.yaml
new file mode 100644
index 000000000000..3e1a7b3c9c9a
--- /dev/null
+++ b/bin/configs/dart-dio-next-petstore-client-lib-fake-json_serializable.yaml
@@ -0,0 +1,12 @@
+generatorName: dart-dio-next
+outputDir: samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable
+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"
+ enumUnknownDefaultCase: "true"
+ serializationLibrary: "json_serializable"
diff --git a/docs/generators/dart-dio-next.md b/docs/generators/dart-dio-next.md
index ed14907168e8..3dea4ca24ec7 100644
--- a/docs/generators/dart-dio-next.md
+++ b/docs/generators/dart-dio-next.md
@@ -23,6 +23,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false** The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. **true** Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default. |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|**false** No changes to the enum's are made, this is the default option. **true** With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case. |false|
+|finalProperties|Whether properties are marked as final when using Json Serializable for serialization| |true|
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C#have this enabled by default).|**true** The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document. **false** The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing. |true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
|pubAuthor|Author name in generated pubspec| |Author|
@@ -32,7 +33,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|pubLibrary|Library name in generated code| |openapi.api|
|pubName|Name in generated pubspec| |openapi|
|pubVersion|Version in generated pubspec| |1.0.0|
-|serializationLibrary|Specify serialization library|**built_value** [DEFAULT] built_value |built_value|
+|serializationLibrary|Specify serialization library|**built_value** [DEFAULT] built_value **json_serializable** [BETA] json_serializable |built_value|
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|sourceFolder|source folder for generated code| |src|
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 b6eea21d1a8a..212a068295f3 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
@@ -56,9 +56,13 @@ public class DartDioNextClientCodegen extends AbstractDartCodegen {
public static final String DATE_LIBRARY_DEFAULT = DATE_LIBRARY_CORE;
public static final String SERIALIZATION_LIBRARY_BUILT_VALUE = "built_value";
+ public static final String SERIALIZATION_LIBRARY_JSON_SERIALIZABLE = "json_serializable";
public static final String SERIALIZATION_LIBRARY_DEFAULT = SERIALIZATION_LIBRARY_BUILT_VALUE;
private static final String DIO_IMPORT = "package:dio/dio.dart";
+ public static final String FINAL_PROPERTIES = "finalProperties";
+ public static final String FINAL_PROPERTIES_DEFAULT_VALUE = "true";
+
private static final String CLIENT_NAME = "clientName";
private String dateLibrary;
@@ -85,11 +89,17 @@ public DartDioNextClientCodegen() {
this.setTemplateDir(embeddedTemplateDir);
supportedLibraries.put(SERIALIZATION_LIBRARY_BUILT_VALUE, "[DEFAULT] built_value");
+ supportedLibraries.put(SERIALIZATION_LIBRARY_JSON_SERIALIZABLE, "[BETA] json_serializable");
final CliOption serializationLibrary = CliOption.newString(CodegenConstants.SERIALIZATION_LIBRARY, "Specify serialization library");
serializationLibrary.setEnum(supportedLibraries);
serializationLibrary.setDefault(SERIALIZATION_LIBRARY_DEFAULT);
cliOptions.add(serializationLibrary);
+ final CliOption finalProperties = CliOption.newBoolean(FINAL_PROPERTIES, "Whether properties are marked as final when using Json Serializable for serialization");
+ finalProperties.setDefault("true");
+ cliOptions.add(finalProperties);
+
+ // Date Library Option
final CliOption dateOption = CliOption.newString(DATE_LIBRARY, "Specify Date library");
dateOption.setDefault(DATE_LIBRARY_DEFAULT);
@@ -147,6 +157,14 @@ public void processOpts() {
}
setDateLibrary(additionalProperties.get(DATE_LIBRARY).toString());
+ if (!additionalProperties.containsKey(FINAL_PROPERTIES)) {
+ additionalProperties.put(FINAL_PROPERTIES, Boolean.parseBoolean(FINAL_PROPERTIES_DEFAULT_VALUE));
+ LOGGER.debug("finalProperties not set, using default {}", FINAL_PROPERTIES_DEFAULT_VALUE);
+ }
+ else {
+ additionalProperties.put(FINAL_PROPERTIES, Boolean.parseBoolean(additionalProperties.get(FINAL_PROPERTIES).toString()));
+ }
+
if (!additionalProperties.containsKey(CLIENT_NAME)) {
final String name = org.openapitools.codegen.utils.StringUtils.camelize(pubName);
additionalProperties.put(CLIENT_NAME, name);
@@ -177,6 +195,10 @@ public void processOpts() {
private void configureSerializationLibrary(String srcFolder) {
switch (library) {
+ case SERIALIZATION_LIBRARY_JSON_SERIALIZABLE:
+ additionalProperties.put("useJsonSerializable", "true");
+ configureSerializationLibraryJsonSerializable(srcFolder);
+ break;
default:
case SERIALIZATION_LIBRARY_BUILT_VALUE:
additionalProperties.put("useBuiltValue", "true");
@@ -229,6 +251,18 @@ private void configureSerializationLibraryBuiltValue(String srcFolder) {
imports.put("MultipartFile", DIO_IMPORT);
}
+ private void configureSerializationLibraryJsonSerializable(String srcFolder) {
+ supportingFiles.add(new SupportingFile("serialization/json_serializable/build.yaml.mustache", "" /* main project dir */, "build.yaml"));
+ supportingFiles.add(new SupportingFile("serialization/json_serializable/deserialize.mustache", srcFolder,
+ "deserialize.dart"));
+
+ // most of these are defined in AbstractDartCodegen, we are overriding
+ // just the binary / file handling
+ languageSpecificPrimitives.add("Object");
+ imports.put("Uint8List", "dart:typed_data");
+ imports.put("MultipartFile", DIO_IMPORT);
+ }
+
private void configureDateLibrary(String srcFolder) {
switch (dateLibrary) {
case DATE_LIBRARY_TIME_MACHINE:
@@ -362,27 +396,30 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List=2.12.0 <3.0.0'
+{{/useBuiltValue}}
+{{#useJsonSerializable}}
+ sdk: '>=2.14.0 <3.0.0'
+{{/useJsonSerializable}}
dependencies:
dio: '>=4.0.0 <5.0.0'
@@ -12,6 +17,9 @@ dependencies:
built_value: '>=8.1.0 <9.0.0'
built_collection: '>=5.1.0 <6.0.0'
{{/useBuiltValue}}
+{{#useJsonSerializable}}
+ json_annotation: '^4.4.0'
+{{/useJsonSerializable}}
{{#useDateLibTimeMachine}}
time_machine: ^0.9.16
{{/useDateLibTimeMachine}}
@@ -21,4 +29,8 @@ dev_dependencies:
built_value_generator: '>=8.1.0 <9.0.0'
build_runner: any
{{/useBuiltValue}}
+{{#useJsonSerializable}}
+ build_runner: any
+ json_serializable: '^6.1.5'
+{{/useJsonSerializable}}
test: ^1.16.0
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/test_instance.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/test_instance.mustache
new file mode 100644
index 000000000000..4ee29fff3cc0
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/built_value/test_instance.mustache
@@ -0,0 +1,2 @@
+ final instance = {{{classname}}}Builder();
+ // TODO add properties to the builder and call build()
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/constructor.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/constructor.mustache
new file mode 100644
index 000000000000..a772c3148eaa
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/constructor.mustache
@@ -0,0 +1 @@
+ const {{classname}}(this._dio);
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/deserialize.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/deserialize.mustache
new file mode 100644
index 000000000000..8b3c794cc4eb
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/deserialize.mustache
@@ -0,0 +1 @@
+_responseData = deserialize<{{{returnType}}}, {{{returnBaseType}}}>(_response.data!, '{{{returnType}}}', growable: true);
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/imports.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/imports.mustache
new file mode 100644
index 000000000000..f2b20f7171b5
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/imports.mustache
@@ -0,0 +1,3 @@
+// ignore: unused_import
+import 'dart:convert';
+import 'package:{{pubName}}/src/deserialize.dart';
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/query_param.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/query_param.mustache
new file mode 100644
index 000000000000..a83489f9e91c
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/query_param.mustache
@@ -0,0 +1 @@
+{{{paramName}}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/serialize.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/serialize.mustache
new file mode 100644
index 000000000000..93aed695e980
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/api/serialize.mustache
@@ -0,0 +1 @@
+{{#bodyParam}}_bodyData=jsonEncode({{{paramName}}});{{/bodyParam}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/build.yaml.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/build.yaml.mustache
new file mode 100644
index 000000000000..89a4dd6e1c2e
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/build.yaml.mustache
@@ -0,0 +1,18 @@
+targets:
+ $default:
+ builders:
+ json_serializable:
+ options:
+ # Options configure how source code is generated for every
+ # `@JsonSerializable`-annotated class in the package.
+ #
+ # The default value for each is listed.
+ any_map: false
+ checked: true
+ create_factory: true
+ create_to_json: true
+ disallow_unrecognized_keys: true
+ explicit_to_json: true
+ field_rename: none
+ ignore_unannotated: false
+ include_if_null: false
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/class.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/class.mustache
new file mode 100644
index 000000000000..6fe97cc9e4af
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/class.mustache
@@ -0,0 +1,93 @@
+import 'package:json_annotation/json_annotation.dart';
+
+part '{{classFilename}}.g.dart';
+
+{{!
+ Classes with polymorphism or composition may generate unused imports,
+ these need to be ignored for said classes so that there are no lint errors.
+}}
+{{#parentModel}}
+// ignore_for_file: unused_import
+
+{{/parentModel}}
+
+@JsonSerializable(
+ checked: true,
+ createToJson: true,
+ disallowUnrecognizedKeys: false,
+ explicitToJson: true,
+)
+class {{{classname}}} {
+{{>serialization/json_serializable/dart_constructor}}
+
+{{#vars}}
+ {{#description}}
+ /// {{{description}}}
+ {{/description}}
+ {{^isEnum}}
+ {{#minimum}}
+ // minimum: {{{minimum}}}
+ {{/minimum}}
+ {{#maximum}}
+ // maximum: {{{maximum}}}
+ {{/maximum}}
+ {{/isEnum}}
+ {{^isBinary}}
+ @JsonKey(
+ {{#defaultValue}}defaultValue: {{{defaultValue}}},{{/defaultValue}}
+ name: r'{{{baseName}}}',
+ required: {{#required}}true{{/required}}{{^required}}false{{/required}},
+ includeIfNull: {{#required}}{{#isNullable}}true{{/isNullable}}false{{/required}}{{^required}}false{{/required}}
+ )
+ {{/isBinary}}
+ {{#isBinary}}
+ @JsonKey(ignore: true)
+ {{/isBinary}}
+
+
+ {{#required}}
+ {{#finalProperties}}final {{/finalProperties}}{{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{{name}}};
+ {{/required}}
+ {{^required}}
+ {{#finalProperties}}final {{/finalProperties}}{{{datatypeWithEnum}}}? {{{name}}};
+ {{/required}}
+
+
+
+{{/vars}}
+ @override
+ bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} &&
+ {{#vars}}
+ other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}}
+ {{/vars}}
+
+ @override
+ int get hashCode =>
+ {{#vars}}
+ {{#isNullable}}({{{name}}} == null ? 0 : {{{name}}}.hashCode){{/isNullable}}{{^isNullable}}{{{name}}}.hashCode{{/isNullable}}{{^-last}} +{{/-last}}{{#-last}};{{/-last}}
+ {{/vars}}
+
+ factory {{{classname}}}.fromJson(Map json) => _${{{classname}}}FromJson(json);
+
+ Map toJson() => _${{{classname}}}ToJson(this);
+
+ @override
+ String toString() {
+ return toJson().toString();
+ }
+
+}
+{{#vars}}
+ {{#isEnum}}
+ {{^isContainer}}
+
+{{>serialization/json_serializable/enum_inline}}
+ {{/isContainer}}
+ {{#isContainer}}
+ {{#mostInnerItems}}
+
+{{>serialization/json_serializable/enum_inline}}
+ {{/mostInnerItems}}
+ {{/isContainer}}
+ {{/isEnum}}
+{{/vars}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/dart_constructor.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/dart_constructor.mustache
new file mode 100644
index 000000000000..3b99f0c54016
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/dart_constructor.mustache
@@ -0,0 +1,11 @@
+ /// Returns a new [{{{classname}}}] instance.
+ {{{classname}}}({
+ {{#vars}}
+
+ {{!
+ A field is required in Dart when it is
+ required && !defaultValue in OAS
+ }}
+ {{#required}}{{^defaultValue}}required {{/defaultValue}}{{/required}} this.{{{name}}}{{#defaultValue}} = {{#isEnum}}{{^isContainer}}const {{{enumName}}}._({{/isContainer}}{{/isEnum}}{{{defaultValue}}}{{#isEnum}}{{^isContainer}}){{/isContainer}}{{/isEnum}}{{/defaultValue}},
+ {{/vars}}
+ });
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/deserialize.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/deserialize.mustache
new file mode 100644
index 000000000000..d2cfeea2a014
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/deserialize.mustache
@@ -0,0 +1,64 @@
+{{#models}}
+ {{#model}}
+ {{^isEnum}}
+import 'package:{{pubName}}/src/model/{{classFilename}}.dart';
+{{/isEnum}}
+{{/model}}
+{{/models}}
+
+final _regList = RegExp(r'^List<(.*)>$');
+final _regSet = RegExp(r'^Set<(.*)>$');
+final _regMap = RegExp(r'^Map$');
+
+ ReturnType deserialize(dynamic value, String targetType, {bool growable= true}) {
+ switch (targetType) {
+ case 'String':
+ return '$value' as ReturnType;
+ case 'int':
+ return (value is int ? value : int.parse('$value')) as ReturnType;
+ case 'bool':
+ if (value is bool) {
+ return value as ReturnType;
+ }
+ final valueString = '$value'.toLowerCase();
+ return (valueString == 'true' || valueString == '1') as ReturnType;
+ case 'double':
+ return (value is double ? value : double.parse('$value')) as ReturnType;
+ {{#models}}
+ {{#model}}
+ case '{{{classname}}}':
+ {{#isEnum}}
+ {{#native_serialization}}return {{{classname}}}TypeTransformer().decode(value);{{/native_serialization}}
+ {{#json_serializable}} return _$enumDecode(_${{{classname}}}EnumMap, value);{{/json_serializable}}
+ {{/isEnum}}
+ {{^isEnum}}
+ return {{{classname}}}.fromJson(value as Map) as ReturnType;
+ {{/isEnum}}
+ {{/model}}
+ {{/models}}
+ default:
+ RegExpMatch? match;
+
+ if (value is List && (match = _regList.firstMatch(targetType)) != null) {
+ targetType = match![1]!; // ignore: parameter_assignments
+ return value
+ .map((dynamic v) => deserialize(v, targetType, growable: growable))
+ .toList(growable: growable) as ReturnType;
+ }
+ if (value is Set && (match = _regSet.firstMatch(targetType)) != null) {
+ targetType = match![1]!; // ignore: parameter_assignments
+ return value
+ .map((dynamic v) => deserialize(v, targetType, growable: growable))
+ .toSet() as ReturnType;
+ }
+ if (value is Map && (match = _regMap.firstMatch(targetType)) != null) {
+ targetType = match![1]!; // ignore: parameter_assignments
+ return Map.fromIterables(
+ value.keys,
+ value.values.map((dynamic v) => deserialize(v, targetType, growable: growable)),
+ ) as ReturnType;
+ }
+ break;
+ }
+ throw Exception('Cannot deserialize');
+ }
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/enum.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/enum.mustache
new file mode 100644
index 000000000000..53f1ec90b529
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/enum.mustache
@@ -0,0 +1,14 @@
+import 'package:json_annotation/json_annotation.dart';
+
+{{#description}}/// {{{description}}}{{/description}}
+enum {{{classname}}} {
+{{#allowableValues}}
+{{#enumVars}}
+ {{#description}}
+ /// {{{.}}}
+ {{/description}}
+ @JsonValue({{#isString}}r{{/isString}}{{{value}}})
+ {{{name}}},
+{{/enumVars}}
+{{/allowableValues}}
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/enum_inline.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/enum_inline.mustache
new file mode 100644
index 000000000000..c9af017948f9
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/enum_inline.mustache
@@ -0,0 +1,11 @@
+{{#enumName}}
+{{#description}}/// {{{description}}}{{/description}}
+enum {{{ enumName }}} {
+{{#allowableValues}}
+{{#enumVars}}
+ @JsonValue({{#isString}}r{{/isString}}{{{value}}})
+ {{{name}}},
+{{/enumVars}}
+{{/allowableValues}}
+}
+{{/enumName}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/test_instance.mustache b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/test_instance.mustache
new file mode 100644
index 000000000000..1b32f6768164
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/dart/libraries/dio/serialization/json_serializable/test_instance.mustache
@@ -0,0 +1,2 @@
+ final {{{classname}}}? instance = /* {{{classname}}}(...) */ null;
+ // TODO add properties to the entity
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache b/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache
index 186986237424..cf182945cdbd 100644
--- a/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache
+++ b/modules/openapi-generator/src/main/resources/dart2/pubspec.mustache
@@ -14,3 +14,6 @@ dependencies:
meta: '^1.1.8'
dev_dependencies:
test: '>=1.16.0 <1.18.0'
+{{#json_serializable}}
+ build_runner: '^1.10.9'
+ json_serializable: '^3.5.1'{{/json_serializable}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java
index cda6e36cfc6c..d1ee3c3cbffb 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioNextClientOptionsProvider.java
@@ -59,6 +59,7 @@ public Map createOptions() {
.put(DartDioNextClientCodegen.PUB_HOMEPAGE, PUB_HOMEPAGE_VALUE)
.put(CodegenConstants.SERIALIZATION_LIBRARY, DartDioNextClientCodegen.SERIALIZATION_LIBRARY_DEFAULT)
.put(DartDioNextClientCodegen.DATE_LIBRARY, DartDioNextClientCodegen.DATE_LIBRARY_DEFAULT)
+ .put(DartDioNextClientCodegen.FINAL_PROPERTIES, DartDioNextClientCodegen.FINAL_PROPERTIES_DEFAULT_VALUE)
.put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE)
.put(DartDioNextClientCodegen.USE_ENUM_EXTENSION, USE_ENUM_EXTENSION)
.put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE)
diff --git a/pom.xml b/pom.xml
index 8af99164eb33..f5a237e19a63 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1323,6 +1323,7 @@
samples/openapi3/client/petstore/dart2/petstore_client_lib
samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake
+ samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.gitignore b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.gitignore
new file mode 100644
index 000000000000..4298cdcbd1a2
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.gitignore
@@ -0,0 +1,41 @@
+# See https://dart.dev/guides/libraries/private-files
+
+# Files and directories created by pub
+.dart_tool/
+.buildlog
+.packages
+.project
+.pub/
+build/
+**/packages/
+
+# Files created by dart2js
+# (Most Dart developers will use pub build to compile Dart, use/modify these
+# rules if you intend to use dart2js directly
+# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
+# differentiate from explicit Javascript files)
+*.dart.js
+*.part.js
+*.js.deps
+*.js.map
+*.info.json
+
+# Directory created by dartdoc
+doc/api/
+
+# Don't commit pubspec lock file
+# (Library packages only! Remove pattern if developing an application package)
+pubspec.lock
+
+# 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:
+
+# IntelliJ
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# Mac
+.DS_Store
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore
new file mode 100644
index 000000000000..7484ee590a38
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES
new file mode 100644
index 000000000000..85246cb6d0eb
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES
@@ -0,0 +1,123 @@
+.gitignore
+README.md
+analysis_options.yaml
+build.yaml
+doc/AdditionalPropertiesClass.md
+doc/AllOfWithSingleRef.md
+doc/Animal.md
+doc/AnotherFakeApi.md
+doc/ApiResponse.md
+doc/ArrayOfArrayOfNumberOnly.md
+doc/ArrayOfNumberOnly.md
+doc/ArrayTest.md
+doc/Capitalization.md
+doc/Cat.md
+doc/CatAllOf.md
+doc/Category.md
+doc/ClassModel.md
+doc/DefaultApi.md
+doc/DeprecatedObject.md
+doc/Dog.md
+doc/DogAllOf.md
+doc/EnumArrays.md
+doc/EnumTest.md
+doc/FakeApi.md
+doc/FakeClassnameTags123Api.md
+doc/FileSchemaTestClass.md
+doc/Foo.md
+doc/FormatTest.md
+doc/HasOnlyReadOnly.md
+doc/HealthCheckResult.md
+doc/InlineResponseDefault.md
+doc/MapTest.md
+doc/MixedPropertiesAndAdditionalPropertiesClass.md
+doc/Model200Response.md
+doc/ModelClient.md
+doc/ModelEnumClass.md
+doc/ModelFile.md
+doc/ModelList.md
+doc/ModelReturn.md
+doc/Name.md
+doc/NullableClass.md
+doc/NumberOnly.md
+doc/ObjectWithDeprecatedFields.md
+doc/Order.md
+doc/OuterComposite.md
+doc/OuterEnum.md
+doc/OuterEnumDefaultValue.md
+doc/OuterEnumInteger.md
+doc/OuterEnumIntegerDefaultValue.md
+doc/OuterObjectWithEnumProperty.md
+doc/Pet.md
+doc/PetApi.md
+doc/ReadOnlyFirst.md
+doc/SingleRefType.md
+doc/SpecialModelName.md
+doc/StoreApi.md
+doc/Tag.md
+doc/User.md
+doc/UserApi.md
+lib/openapi.dart
+lib/src/api.dart
+lib/src/api/another_fake_api.dart
+lib/src/api/default_api.dart
+lib/src/api/fake_api.dart
+lib/src/api/fake_classname_tags123_api.dart
+lib/src/api/pet_api.dart
+lib/src/api/store_api.dart
+lib/src/api/user_api.dart
+lib/src/auth/api_key_auth.dart
+lib/src/auth/auth.dart
+lib/src/auth/basic_auth.dart
+lib/src/auth/bearer_auth.dart
+lib/src/auth/oauth.dart
+lib/src/deserialize.dart
+lib/src/model/additional_properties_class.dart
+lib/src/model/all_of_with_single_ref.dart
+lib/src/model/animal.dart
+lib/src/model/api_response.dart
+lib/src/model/array_of_array_of_number_only.dart
+lib/src/model/array_of_number_only.dart
+lib/src/model/array_test.dart
+lib/src/model/capitalization.dart
+lib/src/model/cat.dart
+lib/src/model/cat_all_of.dart
+lib/src/model/category.dart
+lib/src/model/class_model.dart
+lib/src/model/deprecated_object.dart
+lib/src/model/dog.dart
+lib/src/model/dog_all_of.dart
+lib/src/model/enum_arrays.dart
+lib/src/model/enum_test.dart
+lib/src/model/file_schema_test_class.dart
+lib/src/model/foo.dart
+lib/src/model/format_test.dart
+lib/src/model/has_only_read_only.dart
+lib/src/model/health_check_result.dart
+lib/src/model/inline_response_default.dart
+lib/src/model/map_test.dart
+lib/src/model/mixed_properties_and_additional_properties_class.dart
+lib/src/model/model200_response.dart
+lib/src/model/model_client.dart
+lib/src/model/model_enum_class.dart
+lib/src/model/model_file.dart
+lib/src/model/model_list.dart
+lib/src/model/model_return.dart
+lib/src/model/name.dart
+lib/src/model/nullable_class.dart
+lib/src/model/number_only.dart
+lib/src/model/object_with_deprecated_fields.dart
+lib/src/model/order.dart
+lib/src/model/outer_composite.dart
+lib/src/model/outer_enum.dart
+lib/src/model/outer_enum_default_value.dart
+lib/src/model/outer_enum_integer.dart
+lib/src/model/outer_enum_integer_default_value.dart
+lib/src/model/outer_object_with_enum_property.dart
+lib/src/model/pet.dart
+lib/src/model/read_only_first.dart
+lib/src/model/single_ref_type.dart
+lib/src/model/special_model_name.dart
+lib/src/model/tag.dart
+lib/src/model/user.dart
+pubspec.yaml
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator/VERSION
new file mode 100644
index 000000000000..5f68295fc196
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/.openapi-generator/VERSION
@@ -0,0 +1 @@
+6.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/README.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/README.md
new file mode 100644
index 000000000000..c9853f5643a7
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/README.md
@@ -0,0 +1,202 @@
+# openapi (EXPERIMENTAL)
+This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: 1.0.0
+- Build package: org.openapitools.codegen.languages.DartDioNextClientCodegen
+
+## Requirements
+
+* Dart 2.12.0 or later OR Flutter 1.26.0 or later
+* Dio 4.0.0+
+
+## Installation & Usage
+
+### pub.dev
+To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml
+```yaml
+dependencies:
+ openapi: 1.0.0
+```
+
+### Github
+If this Dart package is published to Github, please include the following in pubspec.yaml
+```yaml
+dependencies:
+ openapi:
+ git:
+ url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
+ #ref: main
+```
+
+### Local development
+To use the package from your local drive, please include the following in pubspec.yaml
+```yaml
+dependencies:
+ openapi:
+ path: /path/to/openapi
+```
+
+## Getting Started
+
+Please follow the [installation procedure](#installation--usage) and then run the following:
+
+```dart
+import 'package:openapi/openapi.dart';
+
+
+final api = Openapi().getAnotherFakeApi();
+final ModelClient modelClient = ; // ModelClient | client model
+
+try {
+ final response = await api.call123testSpecialTags(modelClient);
+ print(response);
+} catch on DioError (e) {
+ print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n");
+}
+
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+[*AnotherFakeApi*](doc/AnotherFakeApi.md) | [**call123testSpecialTags**](doc/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
+[*DefaultApi*](doc/DefaultApi.md) | [**fooGet**](doc/DefaultApi.md#fooget) | **GET** /foo |
+[*FakeApi*](doc/FakeApi.md) | [**fakeHealthGet**](doc/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
+[*FakeApi*](doc/FakeApi.md) | [**fakeHttpSignatureTest**](doc/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
+[*FakeApi*](doc/FakeApi.md) | [**fakeOuterBooleanSerialize**](doc/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
+[*FakeApi*](doc/FakeApi.md) | [**fakeOuterCompositeSerialize**](doc/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
+[*FakeApi*](doc/FakeApi.md) | [**fakeOuterNumberSerialize**](doc/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
+[*FakeApi*](doc/FakeApi.md) | [**fakeOuterStringSerialize**](doc/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
+[*FakeApi*](doc/FakeApi.md) | [**fakePropertyEnumIntegerSerialize**](doc/FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int |
+[*FakeApi*](doc/FakeApi.md) | [**testBodyWithBinary**](doc/FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary |
+[*FakeApi*](doc/FakeApi.md) | [**testBodyWithFileSchema**](doc/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
+[*FakeApi*](doc/FakeApi.md) | [**testBodyWithQueryParams**](doc/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
+[*FakeApi*](doc/FakeApi.md) | [**testClientModel**](doc/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
+[*FakeApi*](doc/FakeApi.md) | [**testEndpointParameters**](doc/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+[*FakeApi*](doc/FakeApi.md) | [**testEnumParameters**](doc/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
+[*FakeApi*](doc/FakeApi.md) | [**testGroupParameters**](doc/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+[*FakeApi*](doc/FakeApi.md) | [**testInlineAdditionalProperties**](doc/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+[*FakeApi*](doc/FakeApi.md) | [**testJsonFormData**](doc/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
+[*FakeApi*](doc/FakeApi.md) | [**testQueryParameterCollectionFormat**](doc/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
+[*FakeClassnameTags123Api*](doc/FakeClassnameTags123Api.md) | [**testClassname**](doc/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
+[*PetApi*](doc/PetApi.md) | [**addPet**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
+[*PetApi*](doc/PetApi.md) | [**deletePet**](doc/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet
+[*PetApi*](doc/PetApi.md) | [**findPetsByStatus**](doc/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status
+[*PetApi*](doc/PetApi.md) | [**findPetsByTags**](doc/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags
+[*PetApi*](doc/PetApi.md) | [**getPetById**](doc/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID
+[*PetApi*](doc/PetApi.md) | [**updatePet**](doc/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
+[*PetApi*](doc/PetApi.md) | [**updatePetWithForm**](doc/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
+[*PetApi*](doc/PetApi.md) | [**uploadFile**](doc/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
+[*PetApi*](doc/PetApi.md) | [**uploadFileWithRequiredFile**](doc/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+[*StoreApi*](doc/StoreApi.md) | [**deleteOrder**](doc/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+[*StoreApi*](doc/StoreApi.md) | [**getInventory**](doc/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
+[*StoreApi*](doc/StoreApi.md) | [**getOrderById**](doc/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID
+[*StoreApi*](doc/StoreApi.md) | [**placeOrder**](doc/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
+[*UserApi*](doc/UserApi.md) | [**createUser**](doc/UserApi.md#createuser) | **POST** /user | Create user
+[*UserApi*](doc/UserApi.md) | [**createUsersWithArrayInput**](doc/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
+[*UserApi*](doc/UserApi.md) | [**createUsersWithListInput**](doc/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
+[*UserApi*](doc/UserApi.md) | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
+[*UserApi*](doc/UserApi.md) | [**getUserByName**](doc/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
+[*UserApi*](doc/UserApi.md) | [**loginUser**](doc/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
+[*UserApi*](doc/UserApi.md) | [**logoutUser**](doc/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
+[*UserApi*](doc/UserApi.md) | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
+
+
+## Documentation For Models
+
+ - [AdditionalPropertiesClass](doc/AdditionalPropertiesClass.md)
+ - [AllOfWithSingleRef](doc/AllOfWithSingleRef.md)
+ - [Animal](doc/Animal.md)
+ - [ApiResponse](doc/ApiResponse.md)
+ - [ArrayOfArrayOfNumberOnly](doc/ArrayOfArrayOfNumberOnly.md)
+ - [ArrayOfNumberOnly](doc/ArrayOfNumberOnly.md)
+ - [ArrayTest](doc/ArrayTest.md)
+ - [Capitalization](doc/Capitalization.md)
+ - [Cat](doc/Cat.md)
+ - [CatAllOf](doc/CatAllOf.md)
+ - [Category](doc/Category.md)
+ - [ClassModel](doc/ClassModel.md)
+ - [DeprecatedObject](doc/DeprecatedObject.md)
+ - [Dog](doc/Dog.md)
+ - [DogAllOf](doc/DogAllOf.md)
+ - [EnumArrays](doc/EnumArrays.md)
+ - [EnumTest](doc/EnumTest.md)
+ - [FileSchemaTestClass](doc/FileSchemaTestClass.md)
+ - [Foo](doc/Foo.md)
+ - [FormatTest](doc/FormatTest.md)
+ - [HasOnlyReadOnly](doc/HasOnlyReadOnly.md)
+ - [HealthCheckResult](doc/HealthCheckResult.md)
+ - [InlineResponseDefault](doc/InlineResponseDefault.md)
+ - [MapTest](doc/MapTest.md)
+ - [MixedPropertiesAndAdditionalPropertiesClass](doc/MixedPropertiesAndAdditionalPropertiesClass.md)
+ - [Model200Response](doc/Model200Response.md)
+ - [ModelClient](doc/ModelClient.md)
+ - [ModelEnumClass](doc/ModelEnumClass.md)
+ - [ModelFile](doc/ModelFile.md)
+ - [ModelList](doc/ModelList.md)
+ - [ModelReturn](doc/ModelReturn.md)
+ - [Name](doc/Name.md)
+ - [NullableClass](doc/NullableClass.md)
+ - [NumberOnly](doc/NumberOnly.md)
+ - [ObjectWithDeprecatedFields](doc/ObjectWithDeprecatedFields.md)
+ - [Order](doc/Order.md)
+ - [OuterComposite](doc/OuterComposite.md)
+ - [OuterEnum](doc/OuterEnum.md)
+ - [OuterEnumDefaultValue](doc/OuterEnumDefaultValue.md)
+ - [OuterEnumInteger](doc/OuterEnumInteger.md)
+ - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md)
+ - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md)
+ - [Pet](doc/Pet.md)
+ - [ReadOnlyFirst](doc/ReadOnlyFirst.md)
+ - [SingleRefType](doc/SingleRefType.md)
+ - [SpecialModelName](doc/SpecialModelName.md)
+ - [Tag](doc/Tag.md)
+ - [User](doc/User.md)
+
+
+## Documentation For Authorization
+
+
+## api_key
+
+- **Type**: API key
+- **API key parameter name**: api_key
+- **Location**: HTTP header
+
+## api_key_query
+
+- **Type**: API key
+- **API key parameter name**: api_key_query
+- **Location**: URL query string
+
+## bearer_test
+
+- **Type**: HTTP basic authentication
+
+## http_basic_test
+
+- **Type**: HTTP basic authentication
+
+## http_signature_test
+
+- **Type**: HTTP basic authentication
+
+## petstore_auth
+
+- **Type**: OAuth
+- **Flow**: implicit
+- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
+- **Scopes**:
+ - **write:pets**: modify pets in your account
+ - **read:pets**: read your pets
+
+
+## Author
+
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/analysis_options.yaml
new file mode 100644
index 000000000000..28be8936a4bd
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/analysis_options.yaml
@@ -0,0 +1,10 @@
+analyzer:
+ language:
+ strict-inference: true
+ strict-raw-types: true
+ strong-mode:
+ implicit-dynamic: false
+ implicit-casts: false
+ exclude:
+ - test/*.dart
+ - lib/src/model/*.g.dart
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/build.yaml b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/build.yaml
new file mode 100644
index 000000000000..89a4dd6e1c2e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/build.yaml
@@ -0,0 +1,18 @@
+targets:
+ $default:
+ builders:
+ json_serializable:
+ options:
+ # Options configure how source code is generated for every
+ # `@JsonSerializable`-annotated class in the package.
+ #
+ # The default value for each is listed.
+ any_map: false
+ checked: true
+ create_factory: true
+ create_to_json: true
+ disallow_unrecognized_keys: true
+ explicit_to_json: true
+ field_rename: none
+ ignore_unannotated: false
+ include_if_null: false
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AdditionalPropertiesClass.md
new file mode 100644
index 000000000000..863b8503db83
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AdditionalPropertiesClass.md
@@ -0,0 +1,16 @@
+# openapi.model.AdditionalPropertiesClass
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mapProperty** | **Map<String, String>** | | [optional]
+**mapOfMapProperty** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md
new file mode 100644
index 000000000000..4c6f3ab2fe11
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md
@@ -0,0 +1,16 @@
+# openapi.model.AllOfWithSingleRef
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**username** | **String** | | [optional]
+**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Animal.md
new file mode 100644
index 000000000000..415b56e9bc2e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Animal.md
@@ -0,0 +1,16 @@
+# openapi.model.Animal
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**className** | **String** | |
+**color** | **String** | | [optional] [default to 'red']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md
new file mode 100644
index 000000000000..df89b0eb12a8
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md
@@ -0,0 +1,57 @@
+# openapi.api.AnotherFakeApi
+
+## Load the API package
+```dart
+import 'package:openapi/api.dart';
+```
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**call123testSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
+
+
+# **call123testSpecialTags**
+> ModelClient call123testSpecialTags(modelClient)
+
+To test special tags
+
+To test special tags and operation ID starting with number
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getAnotherFakeApi();
+final ModelClient modelClient = ; // ModelClient | client model
+
+try {
+ final response = api.call123testSpecialTags(modelClient);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **modelClient** | [**ModelClient**](ModelClient.md)| client model |
+
+### Return type
+
+[**ModelClient**](ModelClient.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ApiResponse.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ApiResponse.md
new file mode 100644
index 000000000000..7ad5da0f89e4
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ApiResponse.md
@@ -0,0 +1,17 @@
+# openapi.model.ApiResponse
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | | [optional]
+**type** | **String** | | [optional]
+**message** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md
new file mode 100644
index 000000000000..e5b9d669a436
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md
@@ -0,0 +1,15 @@
+# openapi.model.ArrayOfArrayOfNumberOnly
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arrayArrayNumber** | [**List<List<num>>**](List.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md
new file mode 100644
index 000000000000..fe8e071eb45c
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md
@@ -0,0 +1,15 @@
+# openapi.model.ArrayOfNumberOnly
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arrayNumber** | **List<num>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayTest.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayTest.md
new file mode 100644
index 000000000000..8ae11de10022
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ArrayTest.md
@@ -0,0 +1,17 @@
+# openapi.model.ArrayTest
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**arrayOfString** | **List<String>** | | [optional]
+**arrayArrayOfInteger** | [**List<List<int>>**](List.md) | | [optional]
+**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Capitalization.md
new file mode 100644
index 000000000000..4a07b4eb820d
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Capitalization.md
@@ -0,0 +1,20 @@
+# openapi.model.Capitalization
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**smallCamel** | **String** | | [optional]
+**capitalCamel** | **String** | | [optional]
+**smallSnake** | **String** | | [optional]
+**capitalSnake** | **String** | | [optional]
+**sCAETHFlowPoints** | **String** | | [optional]
+**ATT_NAME** | **String** | Name of the pet | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Cat.md
new file mode 100644
index 000000000000..6552eea4b435
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Cat.md
@@ -0,0 +1,17 @@
+# openapi.model.Cat
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**className** | **String** | |
+**color** | **String** | | [optional] [default to 'red']
+**declawed** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md
new file mode 100644
index 000000000000..36b2ae0e8ab3
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/CatAllOf.md
@@ -0,0 +1,15 @@
+# openapi.model.CatAllOf
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**declawed** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Category.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Category.md
new file mode 100644
index 000000000000..ae6bc52e89d8
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Category.md
@@ -0,0 +1,16 @@
+# openapi.model.Category
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**name** | **String** | | [default to 'default-name']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ClassModel.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ClassModel.md
new file mode 100644
index 000000000000..13ae5d3a4708
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ClassModel.md
@@ -0,0 +1,15 @@
+# openapi.model.ClassModel
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**class_** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DefaultApi.md
new file mode 100644
index 000000000000..f1753b62ee84
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DefaultApi.md
@@ -0,0 +1,51 @@
+# openapi.api.DefaultApi
+
+## Load the API package
+```dart
+import 'package:openapi/api.dart';
+```
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**fooGet**](DefaultApi.md#fooget) | **GET** /foo |
+
+
+# **fooGet**
+> InlineResponseDefault fooGet()
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getDefaultApi();
+
+try {
+ final response = api.fooGet();
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling DefaultApi->fooGet: $e\n');
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**InlineResponseDefault**](InlineResponseDefault.md)
+
+### Authorization
+
+No authorization required
+
+### 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)
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DeprecatedObject.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DeprecatedObject.md
new file mode 100644
index 000000000000..bf2ef67a26fc
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DeprecatedObject.md
@@ -0,0 +1,15 @@
+# openapi.model.DeprecatedObject
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Dog.md
new file mode 100644
index 000000000000..d36439b767bb
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Dog.md
@@ -0,0 +1,17 @@
+# openapi.model.Dog
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**className** | **String** | |
+**color** | **String** | | [optional] [default to 'red']
+**breed** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md
new file mode 100644
index 000000000000..97a7c8fba492
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/DogAllOf.md
@@ -0,0 +1,15 @@
+# openapi.model.DogAllOf
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**breed** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/EnumArrays.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/EnumArrays.md
new file mode 100644
index 000000000000..1d4fd1363b59
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/EnumArrays.md
@@ -0,0 +1,16 @@
+# openapi.model.EnumArrays
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**justSymbol** | **String** | | [optional]
+**arrayEnum** | **List<String>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/EnumTest.md
new file mode 100644
index 000000000000..7c24fe2347b4
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/EnumTest.md
@@ -0,0 +1,22 @@
+# openapi.model.EnumTest
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**enumString** | **String** | | [optional]
+**enumStringRequired** | **String** | |
+**enumInteger** | **int** | | [optional]
+**enumNumber** | **double** | | [optional]
+**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
+**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
+**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
+**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FakeApi.md
new file mode 100644
index 000000000000..3d408769d11e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FakeApi.md
@@ -0,0 +1,822 @@
+# openapi.api.FakeApi
+
+## Load the API package
+```dart
+import 'package:openapi/api.dart';
+```
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**fakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
+[**fakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
+[**fakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
+[**fakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
+[**fakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
+[**fakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
+[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int |
+[**testBodyWithBinary**](FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary |
+[**testBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
+[**testBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
+[**testClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
+[**testEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+[**testEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
+[**testGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+[**testInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+[**testJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
+[**testQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters |
+
+
+# **fakeHealthGet**
+> HealthCheckResult fakeHealthGet()
+
+Health check endpoint
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+
+try {
+ final response = api.fakeHealthGet();
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->fakeHealthGet: $e\n');
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+[**HealthCheckResult**](HealthCheckResult.md)
+
+### Authorization
+
+No authorization required
+
+### 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)
+
+# **fakeHttpSignatureTest**
+> fakeHttpSignatureTest(pet, query1, header1)
+
+test http signature authentication
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+// TODO Configure HTTP basic authorization: http_signature_test
+//defaultApiClient.getAuthentication('http_signature_test').username = 'YOUR_USERNAME'
+//defaultApiClient.getAuthentication('http_signature_test').password = 'YOUR_PASSWORD';
+
+final api = Openapi().getFakeApi();
+final Pet pet = ; // Pet | Pet object that needs to be added to the store
+final String query1 = query1_example; // String | query parameter
+final String header1 = header1_example; // String | header parameter
+
+try {
+ api.fakeHttpSignatureTest(pet, query1, header1);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+ **query1** | **String**| query parameter | [optional]
+ **header1** | **String**| header parameter | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[http_signature_test](../README.md#http_signature_test)
+
+### 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)
+
+# **fakeOuterBooleanSerialize**
+> bool fakeOuterBooleanSerialize(body)
+
+
+
+Test serialization of outer boolean types
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final bool body = true; // bool | Input boolean as post body
+
+try {
+ final response = api.fakeOuterBooleanSerialize(body);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **bool**| Input boolean as post body | [optional]
+
+### Return type
+
+**bool**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+[[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)
+
+# **fakeOuterCompositeSerialize**
+> OuterComposite fakeOuterCompositeSerialize(outerComposite)
+
+
+
+Test serialization of object with outer number type
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body
+
+try {
+ final response = api.fakeOuterCompositeSerialize(outerComposite);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
+
+### Return type
+
+[**OuterComposite**](OuterComposite.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+[[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)
+
+# **fakeOuterNumberSerialize**
+> num fakeOuterNumberSerialize(body)
+
+
+
+Test serialization of outer number types
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final num body = 8.14; // num | Input number as post body
+
+try {
+ final response = api.fakeOuterNumberSerialize(body);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **num**| Input number as post body | [optional]
+
+### Return type
+
+**num**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+[[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)
+
+# **fakeOuterStringSerialize**
+> String fakeOuterStringSerialize(body)
+
+
+
+Test serialization of outer string types
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final String body = body_example; // String | Input string as post body
+
+try {
+ final response = api.fakeOuterStringSerialize(body);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **String**| Input string as post body | [optional]
+
+### Return type
+
+**String**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+[[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)
+
+# **fakePropertyEnumIntegerSerialize**
+> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty)
+
+
+
+Test serialization of enum (int) properties with examples
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body
+
+try {
+ final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body |
+
+### Return type
+
+[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+[[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)
+
+# **testBodyWithBinary**
+> testBodyWithBinary(body)
+
+
+
+For this test, the body has to be a binary file.
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload
+
+try {
+ api.testBodyWithBinary(body);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testBodyWithBinary: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **MultipartFile**| image to upload |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: image/png
+ - **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)
+
+# **testBodyWithFileSchema**
+> testBodyWithFileSchema(fileSchemaTestClass)
+
+
+
+For this test, the body for this request must reference a schema named `File`.
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass |
+
+try {
+ api.testBodyWithFileSchema(fileSchemaTestClass);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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)
+
+# **testBodyWithQueryParams**
+> testBodyWithQueryParams(query, user)
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final String query = query_example; // String |
+final User user = ; // User |
+
+try {
+ api.testBodyWithQueryParams(query, user);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query** | **String**| |
+ **user** | [**User**](User.md)| |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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)
+
+# **testClientModel**
+> ModelClient testClientModel(modelClient)
+
+To test \"client\" model
+
+To test \"client\" model
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final ModelClient modelClient = ; // ModelClient | client model
+
+try {
+ final response = api.testClientModel(modelClient);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testClientModel: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **modelClient** | [**ModelClient**](ModelClient.md)| client model |
+
+### Return type
+
+[**ModelClient**](ModelClient.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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)
+
+# **testEndpointParameters**
+> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback)
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+// TODO Configure HTTP basic authorization: http_basic_test
+//defaultApiClient.getAuthentication('http_basic_test').username = 'YOUR_USERNAME'
+//defaultApiClient.getAuthentication('http_basic_test').password = 'YOUR_PASSWORD';
+
+final api = Openapi().getFakeApi();
+final num number = 8.14; // num | None
+final double double_ = 1.2; // double | None
+final String patternWithoutDelimiter = patternWithoutDelimiter_example; // String | None
+final String byte = BYTE_ARRAY_DATA_HERE; // String | None
+final int integer = 56; // int | None
+final int int32 = 56; // int | None
+final int int64 = 789; // int | None
+final double float = 3.4; // double | None
+final String string = string_example; // String | None
+final MultipartFile binary = BINARY_DATA_HERE; // MultipartFile | None
+final DateTime date = 2013-10-20; // DateTime | None
+final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None
+final String password = password_example; // String | None
+final String callback = callback_example; // String | None
+
+try {
+ api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testEndpointParameters: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **number** | **num**| None |
+ **double_** | **double**| None |
+ **patternWithoutDelimiter** | **String**| None |
+ **byte** | **String**| None |
+ **integer** | **int**| None | [optional]
+ **int32** | **int**| None | [optional]
+ **int64** | **int**| None | [optional]
+ **float** | **double**| None | [optional]
+ **string** | **String**| None | [optional]
+ **binary** | **MultipartFile**| None | [optional]
+ **date** | **DateTime**| None | [optional]
+ **dateTime** | **DateTime**| None | [optional]
+ **password** | **String**| None | [optional]
+ **callback** | **String**| None | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[http_basic_test](../README.md#http_basic_test)
+
+### 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)
+
+# **testEnumParameters**
+> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString)
+
+To test enum parameters
+
+To test enum parameters
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final List enumHeaderStringArray = ; // List | Header parameter enum test (string array)
+final String enumHeaderString = enumHeaderString_example; // String | Header parameter enum test (string)
+final List enumQueryStringArray = ; // List | Query parameter enum test (string array)
+final String enumQueryString = enumQueryString_example; // String | Query parameter enum test (string)
+final int enumQueryInteger = 56; // int | Query parameter enum test (double)
+final double enumQueryDouble = 1.2; // double | Query parameter enum test (double)
+final List enumQueryModelArray = ; // List |
+final List enumFormStringArray = ; // List | Form parameter enum test (string array)
+final String enumFormString = enumFormString_example; // String | Form parameter enum test (string)
+
+try {
+ api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testEnumParameters: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional]
+ **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg']
+ **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional]
+ **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg']
+ **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional]
+ **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional]
+ **enumQueryModelArray** | [**List<ModelEnumClass>**](ModelEnumClass.md)| | [optional]
+ **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to '$']
+ **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg']
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### 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)
+
+# **testGroupParameters**
+> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group)
+
+Fake endpoint to test group parameters (optional)
+
+Fake endpoint to test group parameters (optional)
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+// TODO Configure HTTP basic authorization: bearer_test
+//defaultApiClient.getAuthentication('bearer_test').username = 'YOUR_USERNAME'
+//defaultApiClient.getAuthentication('bearer_test').password = 'YOUR_PASSWORD';
+
+final api = Openapi().getFakeApi();
+final int requiredStringGroup = 56; // int | Required String in group parameters
+final bool requiredBooleanGroup = true; // bool | Required Boolean in group parameters
+final int requiredInt64Group = 789; // int | Required Integer in group parameters
+final int stringGroup = 56; // int | String in group parameters
+final bool booleanGroup = true; // bool | Boolean in group parameters
+final int int64Group = 789; // int | Integer in group parameters
+
+try {
+ api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testGroupParameters: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **requiredStringGroup** | **int**| Required String in group parameters |
+ **requiredBooleanGroup** | **bool**| Required Boolean in group parameters |
+ **requiredInt64Group** | **int**| Required Integer in group parameters |
+ **stringGroup** | **int**| String in group parameters | [optional]
+ **booleanGroup** | **bool**| Boolean in group parameters | [optional]
+ **int64Group** | **int**| Integer in group parameters | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[bearer_test](../README.md#bearer_test)
+
+### 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)
+
+# **testInlineAdditionalProperties**
+> testInlineAdditionalProperties(requestBody)
+
+test inline additionalProperties
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final Map requestBody = ; // Map | request body
+
+try {
+ api.testInlineAdditionalProperties(requestBody);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **requestBody** | [**Map<String, String>**](String.md)| request body |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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)
+
+# **testJsonFormData**
+> testJsonFormData(param, param2)
+
+test json serialization of form data
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final String param = param_example; // String | field1
+final String param2 = param2_example; // String | field2
+
+try {
+ api.testJsonFormData(param, param2);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testJsonFormData: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **param** | **String**| field1 |
+ **param2** | **String**| field2 |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### 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)
+
+# **testQueryParameterCollectionFormat**
+> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language)
+
+
+
+To test the collection format in query parameters
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getFakeApi();
+final List pipe = ; // List |
+final List ioutil = ; // List |
+final List http = ; // List |
+final List url = ; // List |
+final List context = ; // List |
+final String allowEmpty = allowEmpty_example; // String |
+final Map language = ; // Map |
+
+try {
+ api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language);
+} catch on DioError (e) {
+ print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pipe** | [**List<String>**](String.md)| |
+ **ioutil** | [**List<String>**](String.md)| |
+ **http** | [**List<String>**](String.md)| |
+ **url** | [**List<String>**](String.md)| |
+ **context** | [**List<String>**](String.md)| |
+ **allowEmpty** | **String**| |
+ **language** | [**Map<String, String>**](String.md)| | [optional]
+
+### 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)
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md
new file mode 100644
index 000000000000..35e244fbf21e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md
@@ -0,0 +1,61 @@
+# openapi.api.FakeClassnameTags123Api
+
+## Load the API package
+```dart
+import 'package:openapi/api.dart';
+```
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**testClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+# **testClassname**
+> ModelClient testClassname(modelClient)
+
+To test class name in snake case
+
+To test class name in snake case
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+// TODO Configure API key authorization: api_key_query
+//defaultApiClient.getAuthentication('api_key_query').apiKey = 'YOUR_API_KEY';
+// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+//defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer';
+
+final api = Openapi().getFakeClassnameTags123Api();
+final ModelClient modelClient = ; // ModelClient | client model
+
+try {
+ final response = api.testClassname(modelClient);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **modelClient** | [**ModelClient**](ModelClient.md)| client model |
+
+### Return type
+
+[**ModelClient**](ModelClient.md)
+
+### Authorization
+
+[api_key_query](../README.md#api_key_query)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FileSchemaTestClass.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FileSchemaTestClass.md
new file mode 100644
index 000000000000..d14ac319d294
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FileSchemaTestClass.md
@@ -0,0 +1,16 @@
+# openapi.model.FileSchemaTestClass
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | [**ModelFile**](ModelFile.md) | | [optional]
+**files** | [**List<ModelFile>**](ModelFile.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Foo.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Foo.md
new file mode 100644
index 000000000000..185b76e3f5b4
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Foo.md
@@ -0,0 +1,15 @@
+# openapi.model.Foo
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **String** | | [optional] [default to 'bar']
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FormatTest.md
new file mode 100644
index 000000000000..83b60545eb61
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/FormatTest.md
@@ -0,0 +1,30 @@
+# openapi.model.FormatTest
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**integer** | **int** | | [optional]
+**int32** | **int** | | [optional]
+**int64** | **int** | | [optional]
+**number** | **num** | |
+**float** | **double** | | [optional]
+**double_** | **double** | | [optional]
+**decimal** | **double** | | [optional]
+**string** | **String** | | [optional]
+**byte** | **String** | |
+**binary** | [**MultipartFile**](MultipartFile.md) | | [optional]
+**date** | [**DateTime**](DateTime.md) | |
+**dateTime** | [**DateTime**](DateTime.md) | | [optional]
+**uuid** | **String** | | [optional]
+**password** | **String** | |
+**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional]
+**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/HasOnlyReadOnly.md
new file mode 100644
index 000000000000..32cae937155d
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/HasOnlyReadOnly.md
@@ -0,0 +1,16 @@
+# openapi.model.HasOnlyReadOnly
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **String** | | [optional]
+**foo** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md
new file mode 100644
index 000000000000..4d6aeb75d965
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md
@@ -0,0 +1,15 @@
+# openapi.model.HealthCheckResult
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**nullableMessage** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/InlineResponseDefault.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/InlineResponseDefault.md
new file mode 100644
index 000000000000..c5e61e1162bf
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/InlineResponseDefault.md
@@ -0,0 +1,15 @@
+# openapi.model.InlineResponseDefault
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**string** | [**Foo**](Foo.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/MapTest.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/MapTest.md
new file mode 100644
index 000000000000..197fe780a25a
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/MapTest.md
@@ -0,0 +1,18 @@
+# openapi.model.MapTest
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional]
+**mapOfEnumString** | **Map<String, String>** | | [optional]
+**directMap** | **Map<String, bool>** | | [optional]
+**indirectMap** | **Map<String, bool>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md
new file mode 100644
index 000000000000..66d0d39c42be
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -0,0 +1,17 @@
+# openapi.model.MixedPropertiesAndAdditionalPropertiesClass
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uuid** | **String** | | [optional]
+**dateTime** | [**DateTime**](DateTime.md) | | [optional]
+**map** | [**Map<String, Animal>**](Animal.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Model200Response.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Model200Response.md
new file mode 100644
index 000000000000..5aa3fb97c32e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Model200Response.md
@@ -0,0 +1,16 @@
+# openapi.model.Model200Response
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **int** | | [optional]
+**class_** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelClient.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelClient.md
new file mode 100644
index 000000000000..f7b922f4a398
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelClient.md
@@ -0,0 +1,15 @@
+# openapi.model.ModelClient
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelEnumClass.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelEnumClass.md
new file mode 100644
index 000000000000..ebaafb44c7f7
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelEnumClass.md
@@ -0,0 +1,14 @@
+# openapi.model.ModelEnumClass
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelFile.md
new file mode 100644
index 000000000000..4be260e93f6e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelFile.md
@@ -0,0 +1,15 @@
+# openapi.model.ModelFile
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**sourceURI** | **String** | Test capitalization | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelList.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelList.md
new file mode 100644
index 000000000000..283aa1f6b711
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelList.md
@@ -0,0 +1,15 @@
+# openapi.model.ModelList
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**n123list** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelReturn.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelReturn.md
new file mode 100644
index 000000000000..bc02df7a3692
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ModelReturn.md
@@ -0,0 +1,15 @@
+# openapi.model.ModelReturn
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**return_** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Name.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Name.md
new file mode 100644
index 000000000000..25f49ea946b4
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Name.md
@@ -0,0 +1,18 @@
+# openapi.model.Name
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **int** | |
+**snakeCase** | **int** | | [optional]
+**property** | **String** | | [optional]
+**n123number** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/NullableClass.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/NullableClass.md
new file mode 100644
index 000000000000..70ac1091d417
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/NullableClass.md
@@ -0,0 +1,26 @@
+# openapi.model.NullableClass
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**integerProp** | **int** | | [optional]
+**numberProp** | **num** | | [optional]
+**booleanProp** | **bool** | | [optional]
+**stringProp** | **String** | | [optional]
+**dateProp** | [**DateTime**](DateTime.md) | | [optional]
+**datetimeProp** | [**DateTime**](DateTime.md) | | [optional]
+**arrayNullableProp** | **List<Object>** | | [optional]
+**arrayAndItemsNullableProp** | **List<Object>** | | [optional]
+**arrayItemsNullable** | **List<Object>** | | [optional]
+**objectNullableProp** | **Map<String, Object>** | | [optional]
+**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional]
+**objectItemsNullable** | **Map<String, Object>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md
new file mode 100644
index 000000000000..d8096a3db37a
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md
@@ -0,0 +1,15 @@
+# openapi.model.NumberOnly
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**justNumber** | **num** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md
new file mode 100644
index 000000000000..dda2836d8d54
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md
@@ -0,0 +1,18 @@
+# openapi.model.ObjectWithDeprecatedFields
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uuid** | **String** | | [optional]
+**id** | **num** | | [optional]
+**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional]
+**bars** | **List<String>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Order.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Order.md
new file mode 100644
index 000000000000..bde5ffe51a2c
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Order.md
@@ -0,0 +1,20 @@
+# openapi.model.Order
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**petId** | **int** | | [optional]
+**quantity** | **int** | | [optional]
+**shipDate** | [**DateTime**](DateTime.md) | | [optional]
+**status** | **String** | Order Status | [optional]
+**complete** | **bool** | | [optional] [default to false]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterComposite.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterComposite.md
new file mode 100644
index 000000000000..04bab7eff5d1
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterComposite.md
@@ -0,0 +1,17 @@
+# openapi.model.OuterComposite
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**myNumber** | **num** | | [optional]
+**myString** | **String** | | [optional]
+**myBoolean** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnum.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnum.md
new file mode 100644
index 000000000000..af62ad87ab2e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnum.md
@@ -0,0 +1,14 @@
+# openapi.model.OuterEnum
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumDefaultValue.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumDefaultValue.md
new file mode 100644
index 000000000000..c1bf8b0dec44
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumDefaultValue.md
@@ -0,0 +1,14 @@
+# openapi.model.OuterEnumDefaultValue
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumInteger.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumInteger.md
new file mode 100644
index 000000000000..8c80a9e5c85f
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumInteger.md
@@ -0,0 +1,14 @@
+# openapi.model.OuterEnumInteger
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumIntegerDefaultValue.md
new file mode 100644
index 000000000000..eb8b55d70249
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterEnumIntegerDefaultValue.md
@@ -0,0 +1,14 @@
+# openapi.model.OuterEnumIntegerDefaultValue
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterObjectWithEnumProperty.md
new file mode 100644
index 000000000000..eab2ae8f66b4
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/OuterObjectWithEnumProperty.md
@@ -0,0 +1,15 @@
+# openapi.model.OuterObjectWithEnumProperty
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | [**OuterEnumInteger**](OuterEnumInteger.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Pet.md
new file mode 100644
index 000000000000..3cd230bfb213
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Pet.md
@@ -0,0 +1,20 @@
+# openapi.model.Pet
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**category** | [**Category**](Category.md) | | [optional]
+**name** | **String** | |
+**photoUrls** | **Set<String>** | |
+**tags** | [**List<Tag>**](Tag.md) | | [optional]
+**status** | **String** | pet status in the store | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/PetApi.md
new file mode 100644
index 000000000000..dbf7f15b3cd3
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/PetApi.md
@@ -0,0 +1,439 @@
+# openapi.api.PetApi
+
+## Load the API package
+```dart
+import 'package:openapi/api.dart';
+```
+
+All URIs are relative to *http://petstore.swagger.io:80/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
+[**uploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+
+
+# **addPet**
+> addPet(pet)
+
+Add a new pet to the store
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+// TODO Configure OAuth2 access token for authorization: petstore_auth
+//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN';
+
+final api = Openapi().getPetApi();
+final Pet pet = ; // Pet | Pet object that needs to be added to the store
+
+try {
+ api.addPet(pet);
+} catch on DioError (e) {
+ print('Exception when calling PetApi->addPet: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet** | [**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
+//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN';
+
+final api = Openapi().getPetApi();
+final int petId = 789; // int | Pet id to delete
+final String apiKey = apiKey_example; // String |
+
+try {
+ api.deletePet(petId, apiKey);
+} catch on DioError (e) {
+ print('Exception when calling PetApi->deletePet: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **int**| Pet id to delete |
+ **apiKey** | **String**| | [optional]
+
+### 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
+//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN';
+
+final api = Openapi().getPetApi();
+final List status = ; // List | Status values that need to be considered for filter
+
+try {
+ final response = api.findPetsByStatus(status);
+ print(response);
+} catch on DioError (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 |
+
+### Return type
+
+[**List<Pet>**](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**
+> Set 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
+//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN';
+
+final api = Openapi().getPetApi();
+final Set tags = ; // Set | Tags to filter by
+
+try {
+ final response = api.findPetsByTags(tags);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling PetApi->findPetsByTags: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **tags** | [**Set<String>**](String.md)| Tags to filter by |
+
+### Return type
+
+[**Set<Pet>**](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
+//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY';
+// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer';
+
+final api = Openapi().getPetApi();
+final int petId = 789; // int | ID of pet to return
+
+try {
+ final response = api.getPetById(petId);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling PetApi->getPetById: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **int**| ID of pet to return |
+
+### 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(pet)
+
+Update an existing pet
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+// TODO Configure OAuth2 access token for authorization: petstore_auth
+//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN';
+
+final api = Openapi().getPetApi();
+final Pet pet = ; // Pet | Pet object that needs to be added to the store
+
+try {
+ api.updatePet(pet);
+} catch on DioError (e) {
+ print('Exception when calling PetApi->updatePet: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet** | [**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
+//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN';
+
+final api = Openapi().getPetApi();
+final int petId = 789; // int | ID of pet that needs to be updated
+final String name = name_example; // String | Updated name of the pet
+final String status = status_example; // String | Updated status of the pet
+
+try {
+ api.updatePetWithForm(petId, name, status);
+} catch on DioError (e) {
+ print('Exception when calling PetApi->updatePetWithForm: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **int**| ID of pet that needs to be updated |
+ **name** | **String**| Updated name of the pet | [optional]
+ **status** | **String**| Updated status of the pet | [optional]
+
+### 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
+//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN';
+
+final api = Openapi().getPetApi();
+final int petId = 789; // int | ID of pet to update
+final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
+final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload
+
+try {
+ final response = api.uploadFile(petId, additionalMetadata, file);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling PetApi->uploadFile: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **int**| ID of pet to update |
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional]
+ **file** | **MultipartFile**| file to upload | [optional]
+
+### 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)
+
+# **uploadFileWithRequiredFile**
+> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
+
+uploads an image (required)
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+// TODO Configure OAuth2 access token for authorization: petstore_auth
+//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN';
+
+final api = Openapi().getPetApi();
+final int petId = 789; // int | ID of pet to update
+final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload
+final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server
+
+try {
+ final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **petId** | **int**| ID of pet to update |
+ **requiredFile** | **MultipartFile**| file to upload |
+ **additionalMetadata** | **String**| Additional data to pass to server | [optional]
+
+### 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/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ReadOnlyFirst.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ReadOnlyFirst.md
new file mode 100644
index 000000000000..8f612e8ba19f
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/ReadOnlyFirst.md
@@ -0,0 +1,16 @@
+# openapi.model.ReadOnlyFirst
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **String** | | [optional]
+**baz** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/SingleRefType.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/SingleRefType.md
new file mode 100644
index 000000000000..0dc93840cd7f
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/SingleRefType.md
@@ -0,0 +1,14 @@
+# openapi.model.SingleRefType
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md
new file mode 100644
index 000000000000..5fcfa98e0b36
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md
@@ -0,0 +1,15 @@
+# openapi.model.SpecialModelName
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/StoreApi.md
new file mode 100644
index 000000000000..a25dc85408db
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/StoreApi.md
@@ -0,0 +1,188 @@
+# openapi.api.StoreApi
+
+## Load the API package
+```dart
+import 'package:openapi/api.dart';
+```
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**deleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+[**getInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
+[**getOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | 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';
+
+final api = Openapi().getStoreApi();
+final String orderId = orderId_example; // String | ID of the order that needs to be deleted
+
+try {
+ api.deleteOrder(orderId);
+} catch on DioError (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 |
+
+### 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
+//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY';
+// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer';
+
+final api = Openapi().getStoreApi();
+
+try {
+ final response = api.getInventory();
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling StoreApi->getInventory: $e\n');
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+**Map<String, int>**
+
+### 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';
+
+final api = Openapi().getStoreApi();
+final int orderId = 789; // int | ID of pet that needs to be fetched
+
+try {
+ final response = api.getOrderById(orderId);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling StoreApi->getOrderById: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **orderId** | **int**| ID of pet that needs to be fetched |
+
+### 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(order)
+
+Place an order for a pet
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getStoreApi();
+final Order order = ; // Order | order placed for purchasing the pet
+
+try {
+ final response = api.placeOrder(order);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling StoreApi->placeOrder: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **order** | [**Order**](Order.md)| order placed for purchasing the pet |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Tag.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Tag.md
new file mode 100644
index 000000000000..c219f987c19c
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/Tag.md
@@ -0,0 +1,16 @@
+# openapi.model.Tag
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**name** | **String** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/User.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/User.md
new file mode 100644
index 000000000000..fa87e64d8595
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/User.md
@@ -0,0 +1,22 @@
+# openapi.model.User
+
+## Load the model package
+```dart
+import 'package:openapi/api.dart';
+```
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**username** | **String** | | [optional]
+**firstName** | **String** | | [optional]
+**lastName** | **String** | | [optional]
+**email** | **String** | | [optional]
+**password** | **String** | | [optional]
+**phone** | **String** | | [optional]
+**userStatus** | **int** | User Status | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/UserApi.md
new file mode 100644
index 000000000000..c7fd450beb04
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/doc/UserApi.md
@@ -0,0 +1,359 @@
+# openapi.api.UserApi
+
+## Load the API package
+```dart
+import 'package:openapi/api.dart';
+```
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**createUser**](UserApi.md#createuser) | **POST** /user | Create user
+[**createUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array
+[**createUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array
+[**deleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user
+[**getUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name
+[**loginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system
+[**logoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session
+[**updateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
+
+
+# **createUser**
+> createUser(user)
+
+Create user
+
+This can only be done by the logged in user.
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getUserApi();
+final User user = ; // User | Created user object
+
+try {
+ api.createUser(user);
+} catch on DioError (e) {
+ print('Exception when calling UserApi->createUser: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user** | [**User**](User.md)| Created user object |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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)
+
+# **createUsersWithArrayInput**
+> createUsersWithArrayInput(user)
+
+Creates list of users with given input array
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getUserApi();
+final List user = ; // List | List of user object
+
+try {
+ api.createUsersWithArrayInput(user);
+} catch on DioError (e) {
+ print('Exception when calling UserApi->createUsersWithArrayInput: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user** | [**List<User>**](User.md)| List of user object |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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)
+
+# **createUsersWithListInput**
+> createUsersWithListInput(user)
+
+Creates list of users with given input array
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getUserApi();
+final List user = ; // List | List of user object
+
+try {
+ api.createUsersWithListInput(user);
+} catch on DioError (e) {
+ print('Exception when calling UserApi->createUsersWithListInput: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user** | [**List<User>**](User.md)| List of user object |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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)
+
+# **deleteUser**
+> deleteUser(username)
+
+Delete user
+
+This can only be done by the logged in user.
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getUserApi();
+final String username = username_example; // String | The name that needs to be deleted
+
+try {
+ api.deleteUser(username);
+} catch on DioError (e) {
+ print('Exception when calling UserApi->deleteUser: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The name that needs to be deleted |
+
+### 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)
+
+# **getUserByName**
+> User getUserByName(username)
+
+Get user by user name
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getUserApi();
+final String username = username_example; // String | The name that needs to be fetched. Use user1 for testing.
+
+try {
+ final response = api.getUserByName(username);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling UserApi->getUserByName: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The name that needs to be fetched. Use user1 for testing. |
+
+### Return type
+
+[**User**](User.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)
+
+# **loginUser**
+> String loginUser(username, password)
+
+Logs user into the system
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getUserApi();
+final String username = username_example; // String | The user name for login
+final String password = password_example; // String | The password for login in clear text
+
+try {
+ final response = api.loginUser(username, password);
+ print(response);
+} catch on DioError (e) {
+ print('Exception when calling UserApi->loginUser: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| The user name for login |
+ **password** | **String**| The password for login in clear text |
+
+### Return type
+
+**String**
+
+### 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)
+
+# **logoutUser**
+> logoutUser()
+
+Logs out current logged in user session
+
+
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getUserApi();
+
+try {
+ api.logoutUser();
+} catch on DioError (e) {
+ print('Exception when calling UserApi->logoutUser: $e\n');
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+
+### 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)
+
+# **updateUser**
+> updateUser(username, user)
+
+Updated user
+
+This can only be done by the logged in user.
+
+### Example
+```dart
+import 'package:openapi/api.dart';
+
+final api = Openapi().getUserApi();
+final String username = username_example; // String | name that need to be deleted
+final User user = ; // User | Updated user object
+
+try {
+ api.updateUser(username, user);
+} catch on DioError (e) {
+ print('Exception when calling UserApi->updateUser: $e\n');
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **String**| name that need to be deleted |
+ **user** | [**User**](User.md)| Updated user object |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **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)
+
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/openapi.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/openapi.dart
new file mode 100644
index 000000000000..8b01a3a5e72e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/openapi.dart
@@ -0,0 +1,66 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+
+export 'package:openapi/src/api.dart';
+export 'package:openapi/src/auth/api_key_auth.dart';
+export 'package:openapi/src/auth/basic_auth.dart';
+export 'package:openapi/src/auth/oauth.dart';
+
+
+export 'package:openapi/src/api/another_fake_api.dart';
+export 'package:openapi/src/api/default_api.dart';
+export 'package:openapi/src/api/fake_api.dart';
+export 'package:openapi/src/api/fake_classname_tags123_api.dart';
+export 'package:openapi/src/api/pet_api.dart';
+export 'package:openapi/src/api/store_api.dart';
+export 'package:openapi/src/api/user_api.dart';
+
+export 'package:openapi/src/model/additional_properties_class.dart';
+export 'package:openapi/src/model/all_of_with_single_ref.dart';
+export 'package:openapi/src/model/animal.dart';
+export 'package:openapi/src/model/api_response.dart';
+export 'package:openapi/src/model/array_of_array_of_number_only.dart';
+export 'package:openapi/src/model/array_of_number_only.dart';
+export 'package:openapi/src/model/array_test.dart';
+export 'package:openapi/src/model/capitalization.dart';
+export 'package:openapi/src/model/cat.dart';
+export 'package:openapi/src/model/cat_all_of.dart';
+export 'package:openapi/src/model/category.dart';
+export 'package:openapi/src/model/class_model.dart';
+export 'package:openapi/src/model/deprecated_object.dart';
+export 'package:openapi/src/model/dog.dart';
+export 'package:openapi/src/model/dog_all_of.dart';
+export 'package:openapi/src/model/enum_arrays.dart';
+export 'package:openapi/src/model/enum_test.dart';
+export 'package:openapi/src/model/file_schema_test_class.dart';
+export 'package:openapi/src/model/foo.dart';
+export 'package:openapi/src/model/format_test.dart';
+export 'package:openapi/src/model/has_only_read_only.dart';
+export 'package:openapi/src/model/health_check_result.dart';
+export 'package:openapi/src/model/inline_response_default.dart';
+export 'package:openapi/src/model/map_test.dart';
+export 'package:openapi/src/model/mixed_properties_and_additional_properties_class.dart';
+export 'package:openapi/src/model/model200_response.dart';
+export 'package:openapi/src/model/model_client.dart';
+export 'package:openapi/src/model/model_enum_class.dart';
+export 'package:openapi/src/model/model_file.dart';
+export 'package:openapi/src/model/model_list.dart';
+export 'package:openapi/src/model/model_return.dart';
+export 'package:openapi/src/model/name.dart';
+export 'package:openapi/src/model/nullable_class.dart';
+export 'package:openapi/src/model/number_only.dart';
+export 'package:openapi/src/model/object_with_deprecated_fields.dart';
+export 'package:openapi/src/model/order.dart';
+export 'package:openapi/src/model/outer_composite.dart';
+export 'package:openapi/src/model/outer_enum.dart';
+export 'package:openapi/src/model/outer_enum_default_value.dart';
+export 'package:openapi/src/model/outer_enum_integer.dart';
+export 'package:openapi/src/model/outer_enum_integer_default_value.dart';
+export 'package:openapi/src/model/outer_object_with_enum_property.dart';
+export 'package:openapi/src/model/pet.dart';
+export 'package:openapi/src/model/read_only_first.dart';
+export 'package:openapi/src/model/single_ref_type.dart';
+export 'package:openapi/src/model/special_model_name.dart';
+export 'package:openapi/src/model/tag.dart';
+export 'package:openapi/src/model/user.dart';
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api.dart
new file mode 100644
index 000000000000..55cd646d296e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api.dart
@@ -0,0 +1,110 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+
+import 'package:dio/dio.dart';
+import 'package:openapi/src/auth/api_key_auth.dart';
+import 'package:openapi/src/auth/basic_auth.dart';
+import 'package:openapi/src/auth/bearer_auth.dart';
+import 'package:openapi/src/auth/oauth.dart';
+import 'package:openapi/src/api/another_fake_api.dart';
+import 'package:openapi/src/api/default_api.dart';
+import 'package:openapi/src/api/fake_api.dart';
+import 'package:openapi/src/api/fake_classname_tags123_api.dart';
+import 'package:openapi/src/api/pet_api.dart';
+import 'package:openapi/src/api/store_api.dart';
+import 'package:openapi/src/api/user_api.dart';
+
+class Openapi {
+ static const String basePath = r'http://petstore.swagger.io:80/v2';
+
+ final Dio dio;
+ Openapi({
+ Dio? dio,
+ String? basePathOverride,
+ List? interceptors,
+ }) :
+ this.dio = dio ??
+ Dio(BaseOptions(
+ baseUrl: basePathOverride ?? basePath,
+ connectTimeout: 5000,
+ receiveTimeout: 3000,
+ )) {
+ if (interceptors == null) {
+ this.dio.interceptors.addAll([
+ OAuthInterceptor(),
+ BasicAuthInterceptor(),
+ BearerAuthInterceptor(),
+ ApiKeyAuthInterceptor(),
+ ]);
+ } else {
+ this.dio.interceptors.addAll(interceptors);
+ }
+ }
+
+ void setOAuthToken(String name, String token) {
+ if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) {
+ (this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) as OAuthInterceptor).tokens[name] = token;
+ }
+ }
+
+ void setBearerAuth(String name, String token) {
+ if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) {
+ (this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) as BearerAuthInterceptor).tokens[name] = token;
+ }
+ }
+
+ void setBasicAuth(String name, String username, String password) {
+ if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) {
+ (this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password);
+ }
+ }
+
+ void setApiKey(String name, String apiKey) {
+ if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) {
+ (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor) as ApiKeyAuthInterceptor).apiKeys[name] = apiKey;
+ }
+ }
+
+ /// Get AnotherFakeApi instance, base route and serializer can be overridden by a given but be careful,
+ /// by doing that all interceptors will not be executed
+ AnotherFakeApi getAnotherFakeApi() {
+ return AnotherFakeApi(dio);
+ }
+
+ /// Get DefaultApi instance, base route and serializer can be overridden by a given but be careful,
+ /// by doing that all interceptors will not be executed
+ DefaultApi getDefaultApi() {
+ return DefaultApi(dio);
+ }
+
+ /// Get FakeApi instance, base route and serializer can be overridden by a given but be careful,
+ /// by doing that all interceptors will not be executed
+ FakeApi getFakeApi() {
+ return FakeApi(dio);
+ }
+
+ /// Get FakeClassnameTags123Api instance, base route and serializer can be overridden by a given but be careful,
+ /// by doing that all interceptors will not be executed
+ FakeClassnameTags123Api getFakeClassnameTags123Api() {
+ return FakeClassnameTags123Api(dio);
+ }
+
+ /// Get PetApi instance, base route and serializer can be overridden by a given but be careful,
+ /// by doing that all interceptors will not be executed
+ PetApi getPetApi() {
+ return PetApi(dio);
+ }
+
+ /// Get StoreApi instance, base route and serializer can be overridden by a given but be careful,
+ /// by doing that all interceptors will not be executed
+ StoreApi getStoreApi() {
+ return StoreApi(dio);
+ }
+
+ /// Get UserApi instance, base route and serializer can be overridden by a given but be careful,
+ /// by doing that all interceptors will not be executed
+ UserApi getUserApi() {
+ return UserApi(dio);
+ }
+}
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart
new file mode 100644
index 000000000000..14aea6d2db40
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart
@@ -0,0 +1,106 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+
+import 'dart:async';
+
+// ignore: unused_import
+import 'dart:convert';
+import 'package:openapi/src/deserialize.dart';
+import 'package:dio/dio.dart';
+
+import 'package:openapi/src/model/model_client.dart';
+
+class AnotherFakeApi {
+
+ final Dio _dio;
+
+ const AnotherFakeApi(this._dio);
+
+ /// To test special tags
+ /// To test special tags and operation ID starting with number
+ ///
+ /// Parameters:
+ /// * [modelClient] - client model
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [ModelClient] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> call123testSpecialTags({
+ required ModelClient modelClient,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/another-fake/dummy';
+ final _options = Options(
+ method: r'PATCH',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(modelClient);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ ModelClient _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'ModelClient', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+}
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/default_api.dart
new file mode 100644
index 000000000000..50ad37daada5
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/default_api.dart
@@ -0,0 +1,87 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+
+import 'dart:async';
+
+// ignore: unused_import
+import 'dart:convert';
+import 'package:openapi/src/deserialize.dart';
+import 'package:dio/dio.dart';
+
+import 'package:openapi/src/model/inline_response_default.dart';
+
+class DefaultApi {
+
+ final Dio _dio;
+
+ const DefaultApi(this._dio);
+
+ /// fooGet
+ ///
+ ///
+ /// Parameters:
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [InlineResponseDefault] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> fooGet({
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/foo';
+ final _options = Options(
+ method: r'GET',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ validateStatus: validateStatus,
+ );
+
+ final _response = await _dio.request(
+ _path,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ InlineResponseDefault _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'InlineResponseDefault', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+}
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart
new file mode 100644
index 000000000000..f9294bb4f19c
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart
@@ -0,0 +1,1352 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+
+import 'dart:async';
+
+// ignore: unused_import
+import 'dart:convert';
+import 'package:openapi/src/deserialize.dart';
+import 'package:dio/dio.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/model_enum_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/pet.dart';
+import 'package:openapi/src/model/user.dart';
+
+class FakeApi {
+
+ final Dio _dio;
+
+ const FakeApi(this._dio);
+
+ /// Health check endpoint
+ ///
+ ///
+ /// Parameters:
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [HealthCheckResult] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> fakeHealthGet({
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/health';
+ final _options = Options(
+ method: r'GET',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ validateStatus: validateStatus,
+ );
+
+ final _response = await _dio.request(
+ _path,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ HealthCheckResult _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'HealthCheckResult', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+ /// test http signature authentication
+ ///
+ ///
+ /// Parameters:
+ /// * [pet] - Pet object that needs to be added to the store
+ /// * [query1] - query parameter
+ /// * [header1] - header parameter
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> fakeHttpSignatureTest({
+ required Pet pet,
+ String? query1,
+ String? header1,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/http-signature-test';
+ final _options = Options(
+ method: r'GET',
+ headers: {
+ if (header1 != null) r'header_1': header1,
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[
+ {
+ 'type': 'http',
+ 'scheme': 'signature',
+ 'name': 'http_signature_test',
+ },
+ ],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ final _queryParameters = {
+ if (query1 != null) r'query_1': query1,
+ };
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(pet);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ queryParameters: _queryParameters,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ queryParameters: _queryParameters,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// fakeOuterBooleanSerialize
+ /// Test serialization of outer boolean types
+ ///
+ /// Parameters:
+ /// * [body] - Input boolean as post body
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [bool] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> fakeOuterBooleanSerialize({
+ bool? body,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/outer/boolean';
+ final _options = Options(
+ method: r'POST',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(body);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ bool _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'bool', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+ /// fakeOuterCompositeSerialize
+ /// Test serialization of object with outer number type
+ ///
+ /// Parameters:
+ /// * [outerComposite] - Input composite as post body
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [OuterComposite] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> fakeOuterCompositeSerialize({
+ OuterComposite? outerComposite,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/outer/composite';
+ final _options = Options(
+ method: r'POST',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(outerComposite);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ OuterComposite _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'OuterComposite', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+ /// fakeOuterNumberSerialize
+ /// Test serialization of outer number types
+ ///
+ /// Parameters:
+ /// * [body] - Input number as post body
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [num] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> fakeOuterNumberSerialize({
+ num? body,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/outer/number';
+ final _options = Options(
+ method: r'POST',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(body);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ num _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'num', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+ /// fakeOuterStringSerialize
+ /// Test serialization of outer string types
+ ///
+ /// Parameters:
+ /// * [body] - Input string as post body
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [String] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> fakeOuterStringSerialize({
+ String? body,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/outer/string';
+ final _options = Options(
+ method: r'POST',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(body);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ String _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'String', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+ /// fakePropertyEnumIntegerSerialize
+ /// Test serialization of enum (int) properties with examples
+ ///
+ /// Parameters:
+ /// * [outerObjectWithEnumProperty] - Input enum (int) as post body
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> fakePropertyEnumIntegerSerialize({
+ required OuterObjectWithEnumProperty outerObjectWithEnumProperty,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/property/enum-int';
+ final _options = Options(
+ method: r'POST',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(outerObjectWithEnumProperty);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ OuterObjectWithEnumProperty _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'OuterObjectWithEnumProperty', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+ /// testBodyWithBinary
+ /// For this test, the body has to be a binary file.
+ ///
+ /// Parameters:
+ /// * [body] - image to upload
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testBodyWithBinary({
+ MultipartFile? body,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/body-with-binary';
+ final _options = Options(
+ method: r'PUT',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'image/png',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(body);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// testBodyWithFileSchema
+ /// For this test, the body for this request must reference a schema named `File`.
+ ///
+ /// Parameters:
+ /// * [fileSchemaTestClass]
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testBodyWithFileSchema({
+ required FileSchemaTestClass fileSchemaTestClass,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/body-with-file-schema';
+ final _options = Options(
+ method: r'PUT',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(fileSchemaTestClass);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// testBodyWithQueryParams
+ ///
+ ///
+ /// Parameters:
+ /// * [query]
+ /// * [user]
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testBodyWithQueryParams({
+ required String query,
+ required User user,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/body-with-query-params';
+ final _options = Options(
+ method: r'PUT',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ final _queryParameters = {
+ r'query': query,
+ };
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(user);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ queryParameters: _queryParameters,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ queryParameters: _queryParameters,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// To test \"client\" model
+ /// To test \"client\" model
+ ///
+ /// Parameters:
+ /// * [modelClient] - client model
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [ModelClient] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> testClientModel({
+ required ModelClient modelClient,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake';
+ final _options = Options(
+ method: r'PATCH',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(modelClient);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ ModelClient _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'ModelClient', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+ /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ ///
+ /// Parameters:
+ /// * [number] - None
+ /// * [double_] - None
+ /// * [patternWithoutDelimiter] - None
+ /// * [byte] - None
+ /// * [integer] - None
+ /// * [int32] - None
+ /// * [int64] - None
+ /// * [float] - None
+ /// * [string] - None
+ /// * [binary] - None
+ /// * [date] - None
+ /// * [dateTime] - None
+ /// * [password] - None
+ /// * [callback] - None
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testEndpointParameters({
+ required num number,
+ required double double_,
+ required String patternWithoutDelimiter,
+ required String byte,
+ int? integer,
+ int? int32,
+ int? int64,
+ double? float,
+ String? string,
+ MultipartFile? binary,
+ DateTime? date,
+ DateTime? dateTime,
+ String? password,
+ String? callback,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake';
+ final _options = Options(
+ method: r'POST',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[
+ {
+ 'type': 'http',
+ 'scheme': 'basic',
+ 'name': 'http_basic_test',
+ },
+ ],
+ ...?extra,
+ },
+ contentType: 'application/x-www-form-urlencoded',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// To test enum parameters
+ /// To test enum parameters
+ ///
+ /// Parameters:
+ /// * [enumHeaderStringArray] - Header parameter enum test (string array)
+ /// * [enumHeaderString] - Header parameter enum test (string)
+ /// * [enumQueryStringArray] - Query parameter enum test (string array)
+ /// * [enumQueryString] - Query parameter enum test (string)
+ /// * [enumQueryInteger] - Query parameter enum test (double)
+ /// * [enumQueryDouble] - Query parameter enum test (double)
+ /// * [enumQueryModelArray]
+ /// * [enumFormStringArray] - Form parameter enum test (string array)
+ /// * [enumFormString] - Form parameter enum test (string)
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testEnumParameters({
+ List? enumHeaderStringArray,
+ String? enumHeaderString = '-efg',
+ List? enumQueryStringArray,
+ String? enumQueryString = '-efg',
+ int? enumQueryInteger,
+ double? enumQueryDouble,
+ List? enumQueryModelArray,
+ List? enumFormStringArray,
+ String? enumFormString,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake';
+ final _options = Options(
+ method: r'GET',
+ headers: {
+ if (enumHeaderStringArray != null) r'enum_header_string_array': enumHeaderStringArray,
+ if (enumHeaderString != null) r'enum_header_string': enumHeaderString,
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/x-www-form-urlencoded',
+ validateStatus: validateStatus,
+ );
+
+ final _queryParameters = {
+ if (enumQueryStringArray != null) r'enum_query_string_array': enumQueryStringArray,
+ if (enumQueryString != null) r'enum_query_string': enumQueryString,
+ if (enumQueryInteger != null) r'enum_query_integer': enumQueryInteger,
+ if (enumQueryDouble != null) r'enum_query_double': enumQueryDouble,
+ if (enumQueryModelArray != null) r'enum_query_model_array': enumQueryModelArray,
+ };
+
+ dynamic _bodyData;
+
+ try {
+
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ queryParameters: _queryParameters,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ queryParameters: _queryParameters,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// Fake endpoint to test group parameters (optional)
+ /// Fake endpoint to test group parameters (optional)
+ ///
+ /// Parameters:
+ /// * [requiredStringGroup] - Required String in group parameters
+ /// * [requiredBooleanGroup] - Required Boolean in group parameters
+ /// * [requiredInt64Group] - Required Integer in group parameters
+ /// * [stringGroup] - String in group parameters
+ /// * [booleanGroup] - Boolean in group parameters
+ /// * [int64Group] - Integer in group parameters
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testGroupParameters({
+ required int requiredStringGroup,
+ required bool requiredBooleanGroup,
+ required int requiredInt64Group,
+ int? stringGroup,
+ bool? booleanGroup,
+ int? int64Group,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake';
+ final _options = Options(
+ method: r'DELETE',
+ headers: {
+ r'required_boolean_group': requiredBooleanGroup,
+ if (booleanGroup != null) r'boolean_group': booleanGroup,
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[
+ {
+ 'type': 'http',
+ 'scheme': 'bearer',
+ 'name': 'bearer_test',
+ },
+ ],
+ ...?extra,
+ },
+ validateStatus: validateStatus,
+ );
+
+ final _queryParameters = {
+ r'required_string_group': requiredStringGroup,
+ r'required_int64_group': requiredInt64Group,
+ if (stringGroup != null) r'string_group': stringGroup,
+ if (int64Group != null) r'int64_group': int64Group,
+ };
+
+ final _response = await _dio.request(
+ _path,
+ options: _options,
+ queryParameters: _queryParameters,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// test inline additionalProperties
+ ///
+ ///
+ /// Parameters:
+ /// * [requestBody] - request body
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testInlineAdditionalProperties({
+ required Map requestBody,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/inline-additionalProperties';
+ final _options = Options(
+ method: r'POST',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(requestBody);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// test json serialization of form data
+ ///
+ ///
+ /// Parameters:
+ /// * [param] - field1
+ /// * [param2] - field2
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testJsonFormData({
+ required String param,
+ required String param2,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/jsonFormData';
+ final _options = Options(
+ method: r'GET',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ contentType: 'application/x-www-form-urlencoded',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// testQueryParameterCollectionFormat
+ /// To test the collection format in query parameters
+ ///
+ /// Parameters:
+ /// * [pipe]
+ /// * [ioutil]
+ /// * [http]
+ /// * [url]
+ /// * [context]
+ /// * [allowEmpty]
+ /// * [language]
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> testQueryParameterCollectionFormat({
+ required List pipe,
+ required List ioutil,
+ required List http,
+ required List url,
+ required List context,
+ required String allowEmpty,
+ Map? language,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake/test-query-parameters';
+ final _options = Options(
+ method: r'PUT',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[],
+ ...?extra,
+ },
+ validateStatus: validateStatus,
+ );
+
+ final _queryParameters = {
+ r'pipe': pipe,
+ r'ioutil': ioutil,
+ r'http': http,
+ r'url': url,
+ r'context': context,
+ if (language != null) r'language': language,
+ r'allowEmpty': allowEmpty,
+ };
+
+ final _response = await _dio.request(
+ _path,
+ options: _options,
+ queryParameters: _queryParameters,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+}
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart
new file mode 100644
index 000000000000..bc92a874576e
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart
@@ -0,0 +1,113 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+
+import 'dart:async';
+
+// ignore: unused_import
+import 'dart:convert';
+import 'package:openapi/src/deserialize.dart';
+import 'package:dio/dio.dart';
+
+import 'package:openapi/src/model/model_client.dart';
+
+class FakeClassnameTags123Api {
+
+ final Dio _dio;
+
+ const FakeClassnameTags123Api(this._dio);
+
+ /// To test class name in snake case
+ /// To test class name in snake case
+ ///
+ /// Parameters:
+ /// * [modelClient] - client model
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future] containing a [Response] with a [ModelClient] as data
+ /// Throws [DioError] if API call or serialization fails
+ Future> testClassname({
+ required ModelClient modelClient,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/fake_classname_test';
+ final _options = Options(
+ method: r'PATCH',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[
+ {
+ 'type': 'apiKey',
+ 'name': 'api_key_query',
+ 'keyName': 'api_key_query',
+ 'where': 'query',
+ },
+ ],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(modelClient);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ ModelClient _responseData;
+
+ try {
+_responseData = deserialize(_response.data!, 'ModelClient', growable: true);
+ } catch (error, stackTrace) {
+ throw DioError(
+ requestOptions: _response.requestOptions,
+ response: _response,
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ return Response(
+ data: _responseData,
+ headers: _response.headers,
+ isRedirect: _response.isRedirect,
+ requestOptions: _response.requestOptions,
+ redirects: _response.redirects,
+ statusCode: _response.statusCode,
+ statusMessage: _response.statusMessage,
+ extra: _response.extra,
+ );
+ }
+
+}
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart
new file mode 100644
index 000000000000..fba6d184eb53
--- /dev/null
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart
@@ -0,0 +1,712 @@
+//
+// AUTO-GENERATED FILE, DO NOT MODIFY!
+//
+
+import 'dart:async';
+
+// ignore: unused_import
+import 'dart:convert';
+import 'package:openapi/src/deserialize.dart';
+import 'package:dio/dio.dart';
+
+import 'package:openapi/src/model/api_response.dart';
+import 'package:openapi/src/model/pet.dart';
+
+class PetApi {
+
+ final Dio _dio;
+
+ const PetApi(this._dio);
+
+ /// Add a new pet to the store
+ ///
+ ///
+ /// Parameters:
+ /// * [pet] - Pet object that needs to be added to the store
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> addPet({
+ required Pet pet,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map? extra,
+ ValidateStatus? validateStatus,
+ ProgressCallback? onSendProgress,
+ ProgressCallback? onReceiveProgress,
+ }) async {
+ final _path = r'/pet';
+ final _options = Options(
+ method: r'POST',
+ headers: {
+ ...?headers,
+ },
+ extra: {
+ 'secure': >[
+ {
+ 'type': 'oauth2',
+ 'name': 'petstore_auth',
+ },
+ ],
+ ...?extra,
+ },
+ contentType: 'application/json',
+ validateStatus: validateStatus,
+ );
+
+ dynamic _bodyData;
+
+ try {
+_bodyData=jsonEncode(pet);
+ } catch(error, stackTrace) {
+ throw DioError(
+ requestOptions: _options.compose(
+ _dio.options,
+ _path,
+ ),
+ type: DioErrorType.other,
+ error: error,
+ )..stackTrace = stackTrace;
+ }
+
+ final _response = await _dio.request(
+ _path,
+ data: _bodyData,
+ options: _options,
+ cancelToken: cancelToken,
+ onSendProgress: onSendProgress,
+ onReceiveProgress: onReceiveProgress,
+ );
+
+ return _response;
+ }
+
+ /// Deletes a pet
+ ///
+ ///
+ /// Parameters:
+ /// * [petId] - Pet id to delete
+ /// * [apiKey]
+ /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
+ /// * [headers] - Can be used to add additional headers to the request
+ /// * [extras] - Can be used to add flags to the request
+ /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
+ /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
+ /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
+ ///
+ /// Returns a [Future]
+ /// Throws [DioError] if API call or serialization fails
+ Future> deletePet({
+ required int petId,
+ String? apiKey,
+ CancelToken? cancelToken,
+ Map? headers,
+ Map