Skip to content

Commit f34f5b2

Browse files
committed
[BUG][DART] Regenerate dart-dio samples for new fake-petstore schemas
Added PetReactionStatus, PetReactionResponse, PetEmptyMetadata, PetReactionsResponse to the dart fake-petstore yaml; that yaml is also consumed by dart-dio configs. Regenerate to keep CI 'Samples up-to-date' green. Also strip the auto-generated test stub entries from the FILES index because CI's regen filters them out (see OpenAPITools#23669 for the same pattern).
1 parent 8df1ddd commit f34f5b2

32 files changed

Lines changed: 874 additions & 0 deletions

samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/.openapi-generator/FILES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ doc/OuterObjectWithEnumProperty.md
5656
doc/ParentWithNullable.md
5757
doc/Pet.md
5858
doc/PetApi.md
59+
doc/PetEmptyMetadata.md
60+
doc/PetReactionResponse.md
61+
doc/PetReactionStatus.md
62+
doc/PetReactionsResponse.md
5963
doc/ReadOnlyFirst.md
6064
doc/SingleRefType.md
6165
doc/SpecialModelName.md
@@ -129,6 +133,10 @@ lib/src/model/outer_enum_integer_default_value.dart
129133
lib/src/model/outer_object_with_enum_property.dart
130134
lib/src/model/parent_with_nullable.dart
131135
lib/src/model/pet.dart
136+
lib/src/model/pet_empty_metadata.dart
137+
lib/src/model/pet_reaction_response.dart
138+
lib/src/model/pet_reaction_status.dart
139+
lib/src/model/pet_reactions_response.dart
132140
lib/src/model/read_only_first.dart
133141
lib/src/model/single_ref_type.dart
134142
lib/src/model/special_model_name.dart

samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ Class | Method | HTTP request | Description
166166
- [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md)
167167
- [ParentWithNullable](doc/ParentWithNullable.md)
168168
- [Pet](doc/Pet.md)
169+
- [PetEmptyMetadata](doc/PetEmptyMetadata.md)
170+
- [PetReactionResponse](doc/PetReactionResponse.md)
171+
- [PetReactionStatus](doc/PetReactionStatus.md)
172+
- [PetReactionsResponse](doc/PetReactionsResponse.md)
169173
- [ReadOnlyFirst](doc/ReadOnlyFirst.md)
170174
- [SingleRefType](doc/SingleRefType.md)
171175
- [SpecialModelName](doc/SpecialModelName.md)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# openapi.model.PetEmptyMetadata
2+
3+
## Load the model package
4+
```dart
5+
import 'package:openapi/api.dart';
6+
```
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# openapi.model.PetReactionResponse
2+
3+
## Load the model package
4+
```dart
5+
import 'package:openapi/api.dart';
6+
```
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**petId** | **int** | | [optional]
12+
**status** | **String** | | [optional]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# openapi.model.PetReactionStatus
2+
3+
## Load the model package
4+
```dart
5+
import 'package:openapi/api.dart';
6+
```
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+
14+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# openapi.model.PetReactionsResponse
2+
3+
## Load the model package
4+
```dart
5+
import 'package:openapi/api.dart';
6+
```
7+
8+
## Properties
9+
Name | Type | Description | Notes
10+
------------ | ------------- | ------------- | -------------
11+
**myReacts** | [**Map<String, Map<String, bool>>**](Map.md) | | [optional]
12+
**reactionCounts** | [**Map<String, Map<String, int>>**](Map.md) | | [optional]
13+
14+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
15+
16+

samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/openapi.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export 'package:openapi/src/model/outer_enum_integer_default_value.dart';
6666
export 'package:openapi/src/model/outer_object_with_enum_property.dart';
6767
export 'package:openapi/src/model/parent_with_nullable.dart';
6868
export 'package:openapi/src/model/pet.dart';
69+
export 'package:openapi/src/model/pet_empty_metadata.dart';
70+
export 'package:openapi/src/model/pet_reaction_response.dart';
71+
export 'package:openapi/src/model/pet_reaction_status.dart';
72+
export 'package:openapi/src/model/pet_reactions_response.dart';
6973
export 'package:openapi/src/model/read_only_first.dart';
7074
export 'package:openapi/src/model/single_ref_type.dart';
7175
export 'package:openapi/src/model/special_model_name.dart';

samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/deserialize.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ import 'package:openapi/src/model/outer_composite.dart';
4242
import 'package:openapi/src/model/outer_object_with_enum_property.dart';
4343
import 'package:openapi/src/model/parent_with_nullable.dart';
4444
import 'package:openapi/src/model/pet.dart';
45+
import 'package:openapi/src/model/pet_empty_metadata.dart';
46+
import 'package:openapi/src/model/pet_reaction_response.dart';
47+
import 'package:openapi/src/model/pet_reactions_response.dart';
4548
import 'package:openapi/src/model/read_only_first.dart';
4649
import 'package:openapi/src/model/special_model_name.dart';
4750
import 'package:openapi/src/model/tag.dart';
@@ -169,6 +172,15 @@ final _regMap = RegExp(r'^Map<String,(.*)>$');
169172
return ParentWithNullable.fromJson(value as Map<String, dynamic>) as ReturnType;
170173
case 'Pet':
171174
return Pet.fromJson(value as Map<String, dynamic>) as ReturnType;
175+
case 'PetEmptyMetadata':
176+
return PetEmptyMetadata.fromJson(value as Map<String, dynamic>) as ReturnType;
177+
case 'PetReactionResponse':
178+
return PetReactionResponse.fromJson(value as Map<String, dynamic>) as ReturnType;
179+
case 'PetReactionStatus':
180+
181+
182+
case 'PetReactionsResponse':
183+
return PetReactionsResponse.fromJson(value as Map<String, dynamic>) as ReturnType;
172184
case 'ReadOnlyFirst':
173185
return ReadOnlyFirst.fromJson(value as Map<String, dynamic>) as ReturnType;
174186
case 'SingleRefType':
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//
2+
// AUTO-GENERATED FILE, DO NOT MODIFY!
3+
//
4+
5+
// ignore_for_file: unused_element
6+
import 'package:copy_with_extension/copy_with_extension.dart';
7+
import 'package:json_annotation/json_annotation.dart';
8+
9+
part 'pet_empty_metadata.g.dart';
10+
11+
12+
@CopyWith()
13+
@JsonSerializable(
14+
checked: true,
15+
createToJson: true,
16+
disallowUnrecognizedKeys: false,
17+
explicitToJson: true,
18+
)
19+
class PetEmptyMetadata {
20+
/// Returns a new [PetEmptyMetadata] instance.
21+
PetEmptyMetadata({
22+
});
23+
24+
25+
26+
@override
27+
bool operator ==(Object other) => identical(this, other) || other is PetEmptyMetadata &&
28+
29+
@override
30+
int get hashCode =>
31+
32+
factory PetEmptyMetadata.fromJson(Map<String, dynamic> json) => _$PetEmptyMetadataFromJson(json);
33+
34+
Map<String, dynamic> toJson() => _$PetEmptyMetadataToJson(this);
35+
36+
@override
37+
String toString() {
38+
return toJson().toString();
39+
}
40+
41+
}
42+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
//
2+
// AUTO-GENERATED FILE, DO NOT MODIFY!
3+
//
4+
5+
// ignore_for_file: unused_element
6+
import 'package:copy_with_extension/copy_with_extension.dart';
7+
import 'package:json_annotation/json_annotation.dart';
8+
9+
part 'pet_reaction_response.g.dart';
10+
11+
12+
@CopyWith()
13+
@JsonSerializable(
14+
checked: true,
15+
createToJson: true,
16+
disallowUnrecognizedKeys: false,
17+
explicitToJson: true,
18+
)
19+
class PetReactionResponse {
20+
/// Returns a new [PetReactionResponse] instance.
21+
PetReactionResponse({
22+
23+
this.petId,
24+
25+
this.status,
26+
});
27+
28+
@JsonKey(
29+
30+
name: r'petId',
31+
required: false,
32+
includeIfNull: false,
33+
)
34+
35+
36+
final int? petId;
37+
38+
39+
40+
@JsonKey(
41+
42+
name: r'status',
43+
required: false,
44+
includeIfNull: false,
45+
)
46+
47+
48+
final String? status;
49+
50+
51+
52+
53+
54+
@override
55+
bool operator ==(Object other) => identical(this, other) || other is PetReactionResponse &&
56+
other.petId == petId &&
57+
other.status == status;
58+
59+
@override
60+
int get hashCode =>
61+
petId.hashCode +
62+
status.hashCode;
63+
64+
factory PetReactionResponse.fromJson(Map<String, dynamic> json) => _$PetReactionResponseFromJson(json);
65+
66+
Map<String, dynamic> toJson() => _$PetReactionResponseToJson(this);
67+
68+
@override
69+
String toString() {
70+
return toJson().toString();
71+
}
72+
73+
}
74+

0 commit comments

Comments
 (0)