Skip to content

Commit

Permalink
Merge pull request #1100 from nextcloud/test/dynamite_e2e/add_ofs_tests
Browse files Browse the repository at this point in the history
test(dynamite_end_to_end_test): test problematic ofs
  • Loading branch information
Leptopoda authored Nov 3, 2023
2 parents 3db2a39 + bd8d4fc commit 9bc1ebe
Show file tree
Hide file tree
Showing 9 changed files with 3,991 additions and 0 deletions.
71 changes: 71 additions & 0 deletions packages/dynamite/dynamite_end_to_end_test/lib/all_of.openapi.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
// ignore_for_file: camel_case_types
// ignore_for_file: discarded_futures
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
import 'package:built_value/standard_json_plugin.dart';
import 'package:dynamite_runtime/built_value.dart';
import 'package:dynamite_runtime/http_client.dart';

part 'all_of.openapi.g.dart';

class Client extends DynamiteClient {
Client(
super.baseURL, {
super.baseHeaders,
super.userAgent,
super.httpClient,
super.cookieJar,
});

Client.fromClient(final DynamiteClient client)
: super(
client.baseURL,
baseHeaders: client.baseHeaders,
httpClient: client.httpClient,
cookieJar: client.cookieJar,
authentications: client.authentications,
);
}

@BuiltValue(instantiable: false)
abstract interface class ObjectAllOf_0Interface {
@BuiltValueField(wireName: 'attribute1-allOf')
String get attribute1AllOf;
}

@BuiltValue(instantiable: false)
abstract interface class ObjectAllOf_1Interface {
@BuiltValueField(wireName: 'attribute2-allOf')
String get attribute2AllOf;
}

@BuiltValue(instantiable: false)
abstract interface class ObjectAllOfInterface implements ObjectAllOf_0Interface, ObjectAllOf_1Interface {}

abstract class ObjectAllOf implements ObjectAllOfInterface, Built<ObjectAllOf, ObjectAllOfBuilder> {
factory ObjectAllOf([final void Function(ObjectAllOfBuilder)? b]) = _$ObjectAllOf;

const ObjectAllOf._();

factory ObjectAllOf.fromJson(final Map<String, dynamic> json) => _jsonSerializers.deserializeWith(serializer, json)!;

Map<String, dynamic> toJson() => _jsonSerializers.serializeWith(serializer, this)! as Map<String, dynamic>;

static Serializer<ObjectAllOf> get serializer => _$objectAllOfSerializer;
}

// coverage:ignore-start
final Serializers _serializers = (Serializers().toBuilder()
..addBuilderFactory(const FullType(ObjectAllOf), ObjectAllOf.new)
..add(ObjectAllOf.serializer))
.build();

final Serializers _jsonSerializers = (_serializers.toBuilder()
..add(DynamiteDoubleSerializer())
..addPlugin(StandardJsonPlugin())
..addPlugin(const ContentStringPlugin()))
.build();
// coverage:ignore-end
170 changes: 170 additions & 0 deletions packages/dynamite/dynamite_end_to_end_test/lib/all_of.openapi.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions packages/dynamite/dynamite_end_to_end_test/lib/all_of.openapi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"openapi": "3.1.0",
"info": {
"title": "all of test",
"version": "0.0.1"
},
"components": {
"schemas": {
"ObjectAllOf": {
"description": "All of with objects only.",
"allOf": [
{
"type": "object",
"required": [
"attribute1-allOf"
],
"properties": {
"attribute1-allOf": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"attribute2-allOf"
],
"properties": {
"attribute2-allOf": {
"type": "string"
}
}
}
]
}
}
},
"paths": {},
"tags": []
}
Loading

0 comments on commit 9bc1ebe

Please sign in to comment.