Skip to content

Commit

Permalink
chore(nextcloud,dynamite_end_to_end_test,dynamite_petstore_example): …
Browse files Browse the repository at this point in the history
…disable no_leading_underscores_for_local_identifiers for generated clients

Signed-off-by: Nikolas Rimikis <[email protected]>
  • Loading branch information
Leptopoda committed Dec 19, 2023
1 parent 80d000a commit cba9fee
Show file tree
Hide file tree
Showing 40 changed files with 3,977 additions and 3,923 deletions.
1 change: 1 addition & 0 deletions packages/dynamite/dynamite_end_to_end_test/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ targets:
- public_member_api_docs
- unreachable_switch_case
- unused_element
- no_leading_underscores_for_local_identifiers
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers

import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
Expand Down
43 changes: 22 additions & 21 deletions packages/dynamite/dynamite_end_to_end_test/lib/headers.openapi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers
import 'dart:typed_data';

import 'package:built_value/built_value.dart';
Expand Down Expand Up @@ -60,17 +61,17 @@ class Client extends DynamiteClient {
/// * [$get] for an operation that returns a [DynamiteResponse] with a stable API.
@experimental
DynamiteRawResponse<void, GetHeaders> $getRaw() {
final parameters = <String, dynamic>{};
final headers = <String, String>{};
Uint8List? body;
final _parameters = <String, dynamic>{};
final _headers = <String, String>{};
Uint8List? _body;

final uri = Uri.parse(UriTemplate('/').expand(parameters));
final _uri = Uri.parse(UriTemplate('/').expand(_parameters));
return DynamiteRawResponse<void, GetHeaders>(
response: executeRequest(
'get',
uri,
headers,
body,
_uri,
_headers,
_body,
const {200},
),
bodyType: null,
Expand Down Expand Up @@ -105,17 +106,17 @@ class Client extends DynamiteClient {
/// * [withContentOperationId] for an operation that returns a [DynamiteResponse] with a stable API.
@experimental
DynamiteRawResponse<void, WithContentOperationIdHeaders> withContentOperationIdRaw() {
final parameters = <String, dynamic>{};
final headers = <String, String>{};
Uint8List? body;
final _parameters = <String, dynamic>{};
final _headers = <String, String>{};
Uint8List? _body;

final uri = Uri.parse(UriTemplate('/with_content/operation_id').expand(parameters));
final _uri = Uri.parse(UriTemplate('/with_content/operation_id').expand(_parameters));
return DynamiteRawResponse<void, WithContentOperationIdHeaders>(
response: executeRequest(
'get',
uri,
headers,
body,
_uri,
_headers,
_body,
const {200},
),
bodyType: null,
Expand Down Expand Up @@ -150,19 +151,19 @@ class Client extends DynamiteClient {
/// * [getWithContent] for an operation that returns a [DynamiteResponse] with a stable API.
@experimental
DynamiteRawResponse<Uint8List, GetWithContentHeaders> getWithContentRaw() {
final parameters = <String, dynamic>{};
final headers = <String, String>{
final _parameters = <String, dynamic>{};
final _headers = <String, String>{
'Accept': 'application/octet-stream',
};
Uint8List? body;
Uint8List? _body;

final uri = Uri.parse(UriTemplate('/with_content').expand(parameters));
final _uri = Uri.parse(UriTemplate('/with_content').expand(_parameters));
return DynamiteRawResponse<Uint8List, GetWithContentHeaders>(
response: executeRequest(
'get',
uri,
headers,
body,
_uri,
_headers,
_body,
const {200},
),
bodyType: const FullType(Uint8List),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers
import 'dart:typed_data';

import 'package:built_collection/built_collection.dart';
Expand Down Expand Up @@ -136,73 +137,73 @@ class Client extends DynamiteClient {
GetAnyOf? anyOf,
GetEnumPattern? enumPattern,
}) {
final parameters = <String, dynamic>{};
final headers = <String, String>{
final _parameters = <String, dynamic>{};
final _headers = <String, String>{
'Accept': 'application/json',
};
Uint8List? body;
Uint8List? _body;

final $contentString = jsonSerializers.serialize(
contentString,
specifiedType: const FullType(ContentString, [
FullType(BuiltMap, [FullType(String), FullType(JsonObject)]),
]),
);
parameters['content_string'] = $contentString;
_parameters['content_string'] = $contentString;

final $contentParameter = jsonSerializers.serialize(
contentParameter,
specifiedType: const FullType(ContentString, [
FullType(BuiltMap, [FullType(String), FullType(JsonObject)]),
]),
);
parameters['content_parameter'] = $contentParameter;
_parameters['content_parameter'] = $contentParameter;

final $array = jsonSerializers.serialize(array, specifiedType: const FullType(BuiltList, [FullType(String)]));
parameters['array'] = $array;
_parameters['array'] = $array;

final $$bool = jsonSerializers.serialize($bool, specifiedType: const FullType(bool));
parameters['bool'] = $$bool;
_parameters['bool'] = $$bool;

final $string = jsonSerializers.serialize(string, specifiedType: const FullType(String));
parameters['string'] = $string;
_parameters['string'] = $string;

final $stringBinary = jsonSerializers.serialize(stringBinary, specifiedType: const FullType(Uint8List));
parameters['string_binary'] = $stringBinary;
_parameters['string_binary'] = $stringBinary;

final $$int = jsonSerializers.serialize($int, specifiedType: const FullType(int));
parameters['int'] = $$int;
_parameters['int'] = $$int;

final $$double = jsonSerializers.serialize($double, specifiedType: const FullType(double));
parameters['double'] = $$double;
_parameters['double'] = $$double;

final $$num = jsonSerializers.serialize($num, specifiedType: const FullType(num));
parameters['num'] = $$num;
_parameters['num'] = $$num;

final $object = jsonSerializers.serialize(object, specifiedType: const FullType(JsonObject));
parameters['object'] = $object;
_parameters['object'] = $object;

final $oneOf = jsonSerializers.serialize(oneOf, specifiedType: const FullType(GetOneOf));
parameters['oneOf'] = $oneOf;
_parameters['oneOf'] = $oneOf;

final $anyOf = jsonSerializers.serialize(anyOf, specifiedType: const FullType(GetAnyOf));
parameters['anyOf'] = $anyOf;
_parameters['anyOf'] = $anyOf;

final $enumPattern = jsonSerializers.serialize(enumPattern, specifiedType: const FullType(GetEnumPattern));
dynamite_utils.checkPattern($enumPattern as String?, RegExp('[a-z]'), 'enumPattern');
parameters['enum_pattern'] = $enumPattern;
_parameters['enum_pattern'] = $enumPattern;

final uri = Uri.parse(
final _uri = Uri.parse(
UriTemplate(
'/{?content_string*,content_parameter*,array*,bool*,string*,string_binary*,int*,double*,num*,object*,oneOf*,anyOf*,enum_pattern*}',
).expand(parameters),
).expand(_parameters),
);
return DynamiteRawResponse<JsonObject, void>(
response: executeRequest(
'get',
uri,
headers,
body,
_uri,
_headers,
_body,
const {200},
),
bodyType: const FullType(JsonObject),
Expand Down Expand Up @@ -274,49 +275,49 @@ class Client extends DynamiteClient {
double? $double,
num? $num,
}) {
final parameters = <String, dynamic>{};
final headers = <String, String>{
final _parameters = <String, dynamic>{};
final _headers = <String, String>{
'Accept': 'application/json',
};
Uint8List? body;
Uint8List? _body;

final $array = jsonSerializers.serialize(array, specifiedType: const FullType(BuiltList, [FullType(String)]));
if ($array != null) {
headers['array'] = ($array as List).map<String>((e) => e as String).join();
_headers['array'] = ($array as List).map<String>((e) => e as String).join();
}

final $$bool = jsonSerializers.serialize($bool, specifiedType: const FullType(bool));
if ($$bool != null) {
headers['bool'] = $$bool.toString();
_headers['bool'] = $$bool.toString();
}

final $string = jsonSerializers.serialize(string, specifiedType: const FullType(String));
if ($string != null) {
headers['string'] = $string as String;
_headers['string'] = $string as String;
}

final $$int = jsonSerializers.serialize($int, specifiedType: const FullType(int));
if ($$int != null) {
headers['int'] = $$int.toString();
_headers['int'] = $$int.toString();
}

final $$double = jsonSerializers.serialize($double, specifiedType: const FullType(double));
if ($$double != null) {
headers['double'] = $$double.toString();
_headers['double'] = $$double.toString();
}

final $$num = jsonSerializers.serialize($num, specifiedType: const FullType(num));
if ($$num != null) {
headers['num'] = $$num.toString();
_headers['num'] = $$num.toString();
}

final uri = Uri.parse(UriTemplate('/headers').expand(parameters));
final _uri = Uri.parse(UriTemplate('/headers').expand(_parameters));
return DynamiteRawResponse<JsonObject, void>(
response: executeRequest(
'get',
uri,
headers,
body,
_uri,
_headers,
_body,
const {200},
),
bodyType: const FullType(JsonObject),
Expand Down Expand Up @@ -353,22 +354,22 @@ class Client extends DynamiteClient {
/// * [getPathParameter] for an operation that returns a [DynamiteResponse] with a stable API.
@experimental
DynamiteRawResponse<JsonObject, void> getPathParameterRaw({required String pathParameter}) {
final parameters = <String, dynamic>{};
final headers = <String, String>{
final _parameters = <String, dynamic>{};
final _headers = <String, String>{
'Accept': 'application/json',
};
Uint8List? body;
Uint8List? _body;

final $pathParameter = jsonSerializers.serialize(pathParameter, specifiedType: const FullType(String));
parameters['path_parameter'] = $pathParameter;
_parameters['path_parameter'] = $pathParameter;

final uri = Uri.parse(UriTemplate('/{path_parameter}').expand(parameters));
final _uri = Uri.parse(UriTemplate('/{path_parameter}').expand(_parameters));
return DynamiteRawResponse<JsonObject, void>(
response: executeRequest(
'get',
uri,
headers,
body,
_uri,
_headers,
_body,
const {200},
),
bodyType: const FullType(JsonObject),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// ignore_for_file: public_member_api_docs
// ignore_for_file: unreachable_switch_case
// ignore_for_file: unused_element
// ignore_for_file: no_leading_underscores_for_local_identifiers

import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
Expand Down
Loading

0 comments on commit cba9fee

Please sign in to comment.