forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/5.3.x' into 6.0.x
This commit is contained in:
418
samples/openapi3/client/petstore/dart2/petstore/pubspec.lock
Normal file
418
samples/openapi3/client/petstore/dart2/petstore/pubspec.lock
Normal file
@@ -0,0 +1,418 @@
|
||||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
_fe_analyzer_shared:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: _fe_analyzer_shared
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "14.0.0"
|
||||
analyzer:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: analyzer
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.41.2"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "2.7.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
build:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.6.2"
|
||||
built_collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: built_collection
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "5.1.0"
|
||||
built_value:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: built_value
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "8.1.1"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
cli_util:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: cli_util
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.3.3"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
code_builder:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: code_builder
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "3.7.0"
|
||||
collection:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.15.0"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: convert
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
coverage:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: coverage
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.15.2"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
dart_style:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: dart_style
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.3.12"
|
||||
file:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: file
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "6.1.2"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fixnum
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
glob:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: glob
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
http:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: http
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.13.3"
|
||||
http_multi_server:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_multi_server
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
http_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: http_parser
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "4.0.0"
|
||||
intl:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: intl
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.17.0"
|
||||
io:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: io
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: js
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.6.3"
|
||||
logging:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: logging
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.12.10"
|
||||
meta:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.6.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: mime
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
mockito:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: mockito
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "4.1.4"
|
||||
node_preamble:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: node_preamble
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.4.13"
|
||||
openapi:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: "../petstore_client_lib"
|
||||
relative: true
|
||||
source: path
|
||||
version: "1.0.0"
|
||||
package_config:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: package_config
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.9.3"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
pedantic:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pedantic
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.11.1"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pool
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.5.0"
|
||||
pub_semver:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pub_semver
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
shelf:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
shelf_packages_handler:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_packages_handler
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
shelf_static:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_static
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
shelf_web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_web_socket
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
source_gen:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_gen
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.9.10+3"
|
||||
source_map_stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_map_stack_trace
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
source_maps:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_maps
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.10.10"
|
||||
source_span:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.8.1"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
test:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: test
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.16.5"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.2.19"
|
||||
test_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_core
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "0.3.15"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "6.2.0"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: watcher
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket_channel
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
webkit_inspection_protocol:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webkit_inspection_protocol
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
url: "https://pub.intern.sk"
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
sdks:
|
||||
dart: ">=2.12.0 <3.0.0"
|
||||
@@ -12,6 +12,7 @@ dependencies:
|
||||
path: ../petstore_client_lib
|
||||
|
||||
dev_dependencies:
|
||||
meta: <1.7.0
|
||||
test: ^1.8.0
|
||||
mockito: ^4.1.1
|
||||
http: ^0.13.0
|
||||
|
||||
@@ -15,6 +15,7 @@ doc/CatAllOf.md
|
||||
doc/Category.md
|
||||
doc/ClassModel.md
|
||||
doc/DefaultApi.md
|
||||
doc/DeprecatedObject.md
|
||||
doc/Dog.md
|
||||
doc/DogAllOf.md
|
||||
doc/EnumArrays.md
|
||||
@@ -38,6 +39,7 @@ doc/ModelReturn.md
|
||||
doc/Name.md
|
||||
doc/NullableClass.md
|
||||
doc/NumberOnly.md
|
||||
doc/ObjectWithDeprecatedFields.md
|
||||
doc/Order.md
|
||||
doc/OuterComposite.md
|
||||
doc/OuterEnum.md
|
||||
@@ -81,6 +83,7 @@ lib/model/cat.dart
|
||||
lib/model/cat_all_of.dart
|
||||
lib/model/category.dart
|
||||
lib/model/class_model.dart
|
||||
lib/model/deprecated_object.dart
|
||||
lib/model/dog.dart
|
||||
lib/model/dog_all_of.dart
|
||||
lib/model/enum_arrays.dart
|
||||
@@ -102,6 +105,7 @@ lib/model/model_return.dart
|
||||
lib/model/name.dart
|
||||
lib/model/nullable_class.dart
|
||||
lib/model/number_only.dart
|
||||
lib/model/object_with_deprecated_fields.dart
|
||||
lib/model/order.dart
|
||||
lib/model/outer_composite.dart
|
||||
lib/model/outer_enum.dart
|
||||
|
||||
@@ -114,6 +114,7 @@ Class | Method | HTTP request | Description
|
||||
- [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)
|
||||
@@ -135,6 +136,7 @@ Class | Method | HTTP request | Description
|
||||
- [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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ part 'model/cat.dart';
|
||||
part 'model/cat_all_of.dart';
|
||||
part 'model/category.dart';
|
||||
part 'model/class_model.dart';
|
||||
part 'model/deprecated_object.dart';
|
||||
part 'model/dog.dart';
|
||||
part 'model/dog_all_of.dart';
|
||||
part 'model/enum_arrays.dart';
|
||||
@@ -66,6 +67,7 @@ part 'model/model_return.dart';
|
||||
part 'model/name.dart';
|
||||
part 'model/nullable_class.dart';
|
||||
part 'model/number_only.dart';
|
||||
part 'model/object_with_deprecated_fields.dart';
|
||||
part 'model/order.dart';
|
||||
part 'model/outer_composite.dart';
|
||||
part 'model/outer_enum.dart';
|
||||
|
||||
@@ -218,6 +218,8 @@ class ApiClient {
|
||||
return Category.fromJson(value);
|
||||
case 'ClassModel':
|
||||
return ClassModel.fromJson(value);
|
||||
case 'DeprecatedObject':
|
||||
return DeprecatedObject.fromJson(value);
|
||||
case 'Dog':
|
||||
return Dog.fromJson(value);
|
||||
case 'DogAllOf':
|
||||
@@ -261,6 +263,8 @@ class ApiClient {
|
||||
return NullableClass.fromJson(value);
|
||||
case 'NumberOnly':
|
||||
return NumberOnly.fromJson(value);
|
||||
case 'ObjectWithDeprecatedFields':
|
||||
return ObjectWithDeprecatedFields.fromJson(value);
|
||||
case 'Order':
|
||||
return Order.fromJson(value);
|
||||
case 'OuterComposite':
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class DeprecatedObject {
|
||||
/// Returns a new [DeprecatedObject] instance.
|
||||
DeprecatedObject({
|
||||
this.name,
|
||||
});
|
||||
|
||||
String name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DeprecatedObject &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(name == null ? 0 : name.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'DeprecatedObject[name=$name]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (name != null) {
|
||||
json[r'name'] = name;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [DeprecatedObject] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static DeprecatedObject fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: DeprecatedObject(
|
||||
name: json[r'name'],
|
||||
);
|
||||
|
||||
static List<DeprecatedObject> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <DeprecatedObject>[]
|
||||
: json.map((dynamic value) => DeprecatedObject.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, DeprecatedObject> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, DeprecatedObject>{};
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = DeprecatedObject.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of DeprecatedObject-objects as value to a dart map
|
||||
static Map<String, List<DeprecatedObject>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<DeprecatedObject>>{};
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = DeprecatedObject.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class ObjectWithDeprecatedFields {
|
||||
/// Returns a new [ObjectWithDeprecatedFields] instance.
|
||||
ObjectWithDeprecatedFields({
|
||||
this.uuid,
|
||||
this.id,
|
||||
this.deprecatedRef,
|
||||
this.bars = const [],
|
||||
});
|
||||
|
||||
String uuid;
|
||||
|
||||
num id;
|
||||
|
||||
DeprecatedObject deprecatedRef;
|
||||
|
||||
List<String> bars;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields &&
|
||||
other.uuid == uuid &&
|
||||
other.id == id &&
|
||||
other.deprecatedRef == deprecatedRef &&
|
||||
other.bars == bars;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(uuid == null ? 0 : uuid.hashCode) +
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(deprecatedRef == null ? 0 : deprecatedRef.hashCode) +
|
||||
(bars == null ? 0 : bars.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedRef=$deprecatedRef, bars=$bars]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (uuid != null) {
|
||||
json[r'uuid'] = uuid;
|
||||
}
|
||||
if (id != null) {
|
||||
json[r'id'] = id;
|
||||
}
|
||||
if (deprecatedRef != null) {
|
||||
json[r'deprecatedRef'] = deprecatedRef;
|
||||
}
|
||||
if (bars != null) {
|
||||
json[r'bars'] = bars;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ObjectWithDeprecatedFields] instance and imports its values from
|
||||
/// [json] if it's non-null, null if [json] is null.
|
||||
static ObjectWithDeprecatedFields fromJson(Map<String, dynamic> json) => json == null
|
||||
? null
|
||||
: ObjectWithDeprecatedFields(
|
||||
uuid: json[r'uuid'],
|
||||
id: json[r'id'] == null ?
|
||||
null :
|
||||
json[r'id'].toDouble(),
|
||||
deprecatedRef: DeprecatedObject.fromJson(json[r'deprecatedRef']),
|
||||
bars: json[r'bars'] == null
|
||||
? null
|
||||
: (json[r'bars'] as List).cast<String>(),
|
||||
);
|
||||
|
||||
static List<ObjectWithDeprecatedFields> listFromJson(List<dynamic> json, {bool emptyIsNull, bool growable,}) =>
|
||||
json == null || json.isEmpty
|
||||
? true == emptyIsNull ? null : <ObjectWithDeprecatedFields>[]
|
||||
: json.map((dynamic value) => ObjectWithDeprecatedFields.fromJson(value)).toList(growable: true == growable);
|
||||
|
||||
static Map<String, ObjectWithDeprecatedFields> mapFromJson(Map<String, dynamic> json) {
|
||||
final map = <String, ObjectWithDeprecatedFields>{};
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) => map[key] = ObjectWithDeprecatedFields.fromJson(value));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ObjectWithDeprecatedFields-objects as value to a dart map
|
||||
static Map<String, List<ObjectWithDeprecatedFields>> mapListFromJson(Map<String, dynamic> json, {bool emptyIsNull, bool growable,}) {
|
||||
final map = <String, List<ObjectWithDeprecatedFields>>{};
|
||||
if (json?.isNotEmpty == true) {
|
||||
json.forEach((key, value) {
|
||||
map[key] = ObjectWithDeprecatedFields.listFromJson(value, emptyIsNull: emptyIsNull, growable: growable,);
|
||||
});
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for DeprecatedObject
|
||||
void main() {
|
||||
final instance = DeprecatedObject();
|
||||
|
||||
group('test DeprecatedObject', () {
|
||||
// String name
|
||||
test('to test the property `name`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for ObjectWithDeprecatedFields
|
||||
void main() {
|
||||
final instance = ObjectWithDeprecatedFields();
|
||||
|
||||
group('test ObjectWithDeprecatedFields', () {
|
||||
// String uuid
|
||||
test('to test the property `uuid`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// num id
|
||||
test('to test the property `id`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// DeprecatedObject deprecatedRef
|
||||
test('to test the property `deprecatedRef`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// List<String> bars (default value: const [])
|
||||
test('to test the property `bars`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ doc/CatAllOf.md
|
||||
doc/Category.md
|
||||
doc/ClassModel.md
|
||||
doc/DefaultApi.md
|
||||
doc/DeprecatedObject.md
|
||||
doc/Dog.md
|
||||
doc/DogAllOf.md
|
||||
doc/EnumArrays.md
|
||||
@@ -39,6 +40,7 @@ doc/ModelReturn.md
|
||||
doc/Name.md
|
||||
doc/NullableClass.md
|
||||
doc/NumberOnly.md
|
||||
doc/ObjectWithDeprecatedFields.md
|
||||
doc/Order.md
|
||||
doc/OuterComposite.md
|
||||
doc/OuterEnum.md
|
||||
@@ -82,6 +84,7 @@ lib/model/cat.dart
|
||||
lib/model/cat_all_of.dart
|
||||
lib/model/category.dart
|
||||
lib/model/class_model.dart
|
||||
lib/model/deprecated_object.dart
|
||||
lib/model/dog.dart
|
||||
lib/model/dog_all_of.dart
|
||||
lib/model/enum_arrays.dart
|
||||
@@ -103,6 +106,7 @@ lib/model/model_return.dart
|
||||
lib/model/name.dart
|
||||
lib/model/nullable_class.dart
|
||||
lib/model/number_only.dart
|
||||
lib/model/object_with_deprecated_fields.dart
|
||||
lib/model/order.dart
|
||||
lib/model/outer_composite.dart
|
||||
lib/model/outer_enum.dart
|
||||
|
||||
@@ -114,6 +114,7 @@ Class | Method | HTTP request | Description
|
||||
- [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)
|
||||
@@ -135,6 +136,7 @@ Class | Method | HTTP request | Description
|
||||
- [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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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] [default to const []]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ part 'model/cat.dart';
|
||||
part 'model/cat_all_of.dart';
|
||||
part 'model/category.dart';
|
||||
part 'model/class_model.dart';
|
||||
part 'model/deprecated_object.dart';
|
||||
part 'model/dog.dart';
|
||||
part 'model/dog_all_of.dart';
|
||||
part 'model/enum_arrays.dart';
|
||||
@@ -67,6 +68,7 @@ part 'model/model_return.dart';
|
||||
part 'model/name.dart';
|
||||
part 'model/nullable_class.dart';
|
||||
part 'model/number_only.dart';
|
||||
part 'model/object_with_deprecated_fields.dart';
|
||||
part 'model/order.dart';
|
||||
part 'model/outer_composite.dart';
|
||||
part 'model/outer_enum.dart';
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
@JsonSerializable(
|
||||
checked: true,
|
||||
createToJson: true,
|
||||
disallowUnrecognizedKeys: true,
|
||||
explicitToJson: true,
|
||||
)
|
||||
class DeprecatedObject {
|
||||
/// Returns a new [DeprecatedObject] instance.
|
||||
DeprecatedObject({
|
||||
this.name,
|
||||
});
|
||||
|
||||
@JsonKey(
|
||||
nullable: false,
|
||||
name: r'name',
|
||||
required: false,
|
||||
)
|
||||
String name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is DeprecatedObject &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(name == null ? 0 : name.hashCode);
|
||||
|
||||
factory DeprecatedObject.fromJson(Map<String, dynamic> json) => _$DeprecatedObjectFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DeprecatedObjectToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
@JsonSerializable(
|
||||
checked: true,
|
||||
createToJson: true,
|
||||
disallowUnrecognizedKeys: true,
|
||||
explicitToJson: true,
|
||||
)
|
||||
class ObjectWithDeprecatedFields {
|
||||
/// Returns a new [ObjectWithDeprecatedFields] instance.
|
||||
ObjectWithDeprecatedFields({
|
||||
this.uuid,
|
||||
this.id,
|
||||
this.deprecatedRef,
|
||||
this.bars = const [],
|
||||
});
|
||||
|
||||
@JsonKey(
|
||||
nullable: false,
|
||||
name: r'uuid',
|
||||
required: false,
|
||||
)
|
||||
String uuid;
|
||||
|
||||
@JsonKey(
|
||||
nullable: false,
|
||||
name: r'id',
|
||||
required: false,
|
||||
)
|
||||
num id;
|
||||
|
||||
@JsonKey(
|
||||
nullable: false,
|
||||
name: r'deprecatedRef',
|
||||
required: false,
|
||||
)
|
||||
DeprecatedObject deprecatedRef;
|
||||
|
||||
@JsonKey(
|
||||
defaultValue: const [],
|
||||
name: r'bars',
|
||||
required: false,
|
||||
)
|
||||
List<String> bars;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields &&
|
||||
other.uuid == uuid &&
|
||||
other.id == id &&
|
||||
other.deprecatedRef == deprecatedRef &&
|
||||
other.bars == bars;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
(uuid == null ? 0 : uuid.hashCode) +
|
||||
(id == null ? 0 : id.hashCode) +
|
||||
(deprecatedRef == null ? 0 : deprecatedRef.hashCode) +
|
||||
(bars == null ? 0 : bars.hashCode);
|
||||
|
||||
factory ObjectWithDeprecatedFields.fromJson(Map<String, dynamic> json) => _$ObjectWithDeprecatedFieldsFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ObjectWithDeprecatedFieldsToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return toJson().toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for DeprecatedObject
|
||||
void main() {
|
||||
final instance = DeprecatedObject();
|
||||
|
||||
group('test DeprecatedObject', () {
|
||||
// String name
|
||||
test('to test the property `name`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.0
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for ObjectWithDeprecatedFields
|
||||
void main() {
|
||||
final instance = ObjectWithDeprecatedFields();
|
||||
|
||||
group('test ObjectWithDeprecatedFields', () {
|
||||
// String uuid
|
||||
test('to test the property `uuid`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// num id
|
||||
test('to test the property `id`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// DeprecatedObject deprecatedRef
|
||||
test('to test the property `deprecatedRef`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// List<String> bars (default value: const [])
|
||||
test('to test the property `bars`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user