Skip to content

Commit bd8d4fc

Browse files
committed
test(dynamite_end_to_end_test): test problematic ofs
Signed-off-by: Nikolas Rimikis <leptopoda@users.noreply.github.com>
1 parent 3db2a39 commit bd8d4fc

File tree

9 files changed

+3991
-0
lines changed

9 files changed

+3991
-0
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// ignore_for_file: camel_case_types
2+
// ignore_for_file: discarded_futures
3+
// ignore_for_file: public_member_api_docs
4+
// ignore_for_file: unreachable_switch_case
5+
6+
import 'package:built_value/built_value.dart';
7+
import 'package:built_value/serializer.dart';
8+
import 'package:built_value/standard_json_plugin.dart';
9+
import 'package:dynamite_runtime/built_value.dart';
10+
import 'package:dynamite_runtime/http_client.dart';
11+
12+
part 'all_of.openapi.g.dart';
13+
14+
class Client extends DynamiteClient {
15+
Client(
16+
super.baseURL, {
17+
super.baseHeaders,
18+
super.userAgent,
19+
super.httpClient,
20+
super.cookieJar,
21+
});
22+
23+
Client.fromClient(final DynamiteClient client)
24+
: super(
25+
client.baseURL,
26+
baseHeaders: client.baseHeaders,
27+
httpClient: client.httpClient,
28+
cookieJar: client.cookieJar,
29+
authentications: client.authentications,
30+
);
31+
}
32+
33+
@BuiltValue(instantiable: false)
34+
abstract interface class ObjectAllOf_0Interface {
35+
@BuiltValueField(wireName: 'attribute1-allOf')
36+
String get attribute1AllOf;
37+
}
38+
39+
@BuiltValue(instantiable: false)
40+
abstract interface class ObjectAllOf_1Interface {
41+
@BuiltValueField(wireName: 'attribute2-allOf')
42+
String get attribute2AllOf;
43+
}
44+
45+
@BuiltValue(instantiable: false)
46+
abstract interface class ObjectAllOfInterface implements ObjectAllOf_0Interface, ObjectAllOf_1Interface {}
47+
48+
abstract class ObjectAllOf implements ObjectAllOfInterface, Built<ObjectAllOf, ObjectAllOfBuilder> {
49+
factory ObjectAllOf([final void Function(ObjectAllOfBuilder)? b]) = _$ObjectAllOf;
50+
51+
const ObjectAllOf._();
52+
53+
factory ObjectAllOf.fromJson(final Map<String, dynamic> json) => _jsonSerializers.deserializeWith(serializer, json)!;
54+
55+
Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;
56+
57+
static Serializer<ObjectAllOf> get serializer => _$objectAllOfSerializer;
58+
}
59+
60+
// coverage:ignore-start
61+
final Serializers _serializers = (Serializers().toBuilder()
62+
..addBuilderFactory(const FullType(ObjectAllOf), ObjectAllOf.new)
63+
..add(ObjectAllOf.serializer))
64+
.build();
65+
66+
final Serializers _jsonSerializers = (_serializers.toBuilder()
67+
..add(DynamiteDoubleSerializer())
68+
..addPlugin(StandardJsonPlugin())
69+
..addPlugin(const ContentStringPlugin()))
70+
.build();
71+
// coverage:ignore-end

packages/dynamite/dynamite_end_to_end_test/lib/all_of.openapi.g.dart

Lines changed: 170 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"openapi": "3.1.0",
3+
"info": {
4+
"title": "all of test",
5+
"version": "0.0.1"
6+
},
7+
"components": {
8+
"schemas": {
9+
"ObjectAllOf": {
10+
"description": "All of with objects only.",
11+
"allOf": [
12+
{
13+
"type": "object",
14+
"required": [
15+
"attribute1-allOf"
16+
],
17+
"properties": {
18+
"attribute1-allOf": {
19+
"type": "string"
20+
}
21+
}
22+
},
23+
{
24+
"type": "object",
25+
"required": [
26+
"attribute2-allOf"
27+
],
28+
"properties": {
29+
"attribute2-allOf": {
30+
"type": "string"
31+
}
32+
}
33+
}
34+
]
35+
}
36+
}
37+
},
38+
"paths": {},
39+
"tags": []
40+
}

0 commit comments

Comments
 (0)