Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
554 changes: 0 additions & 554 deletions example/pubspec.lock

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ version: 1.0.0
description: OpenAPI API client
homepage: homepage


environment:
sdk: '>=2.15.0 <4.0.0'
sdk: '>=2.18.0 <4.0.0'

dependencies:
dio: '^5.2.0'
dio: '^5.7.0'
one_of: '>=1.5.0 <2.0.0'
one_of_serializer: '>=1.5.0 <2.0.0'
built_value: '>=8.4.0 <9.0.0'
Expand All @@ -16,4 +17,4 @@ dependencies:
dev_dependencies:
built_value_generator: '>=8.4.0 <9.0.0'
build_runner: any
test: ^1.16.0
test: '^1.16.0'
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions example/lib/main.dart β†’ examples/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void main() {
outputDirectory: 'api/petstore_api',
)
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});

// This widget is the root of your application.
@override
Expand All @@ -41,7 +41,7 @@ class MyApp extends StatelessWidget {
}

class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
const MyHomePage({super.key, required this.title});

// This widget is the home page of your application. It is stateful, meaning
// that it has a State object (defined below) that contains fields that affect
Expand Down
File renamed without changes.
File renamed without changes.
17 changes: 5 additions & 12 deletions example/pubspec.yaml β†’ examples/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: ">=2.15.0 <4.0.0"
sdk: ">=3.5.0 <4.0.0"

resolution: workspace

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand All @@ -30,7 +31,7 @@ environment:
dependencies:
flutter:
sdk: flutter
openapi_generator_annotations: ^6.0.0
openapi_generator_annotations: ^6.1.1
# petstore_api:
# path: ./api/petstore_api

Expand All @@ -39,26 +40,18 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2

dependency_overrides:
openapi_generator:
path: ../openapi-generator
openapi_generator_annotations:
path: ../openapi-generator-annotations
openapi_generator_cli:
path: ../openapi-generator-cli

dev_dependencies:
flutter_test:
sdk: flutter
build_runner:
openapi_generator: ^6.0.0
openapi_generator: ^6.1.1

# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^2.0.1
flutter_lints: ^6.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: openapigeneratorexample
name: openapigeneratorcliexample
description: A new Flutter application.

# The following defines the version and build number for your application.
Expand All @@ -14,7 +14,9 @@ description: A new Flutter application.
version: 1.0.0+1

environment:
sdk: ">=2.12.0 <4.0.0"
sdk: ">=3.5.0 <4.0.0"

resolution: workspace

dependencies:
flutter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,16 @@ description: A new Flutter application.
version: 1.0.0+1

environment:
sdk: ">=2.12.0 <4.0.0"
sdk: ">=3.5.0 <4.0.0"

dependency_overrides:
# analyzer: '0.39.14'
# meta: ^1.2.2
openapi_generator_annotations:
path: ../../openapi-generator-annotations
# openapi_generator:
# path: ../../openapi-generator
# openapi_generator_cli:
# path: ../../openapi-generator-cli
resolution: workspace

dependencies:
# flutter:
# sdk: flutter
openapi_generator_annotations: ^4.10.0
openapi_generator_annotations: ^6.1.1
cupertino_icons: ^1.0.2

dev_dependencies:
# flutter_test:
# sdk: flutter
# build_runner:
# openapi_generator: ^4.10.0


# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// Support for doing something awesome.
///
/// More dartdocs go here.
library openapi_generator_annotations;
library;

export 'src/openapi_generator_annotations_base.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -300,18 +300,18 @@ class RemoteSpec extends InputSpec {
final RemoteSpecHeaderDelegate headerDelegate;

const RemoteSpec({
required String path,
required super.path,
this.headerDelegate = const RemoteSpecHeaderDelegate(),
}) : super(path: path);
});

const RemoteSpec.empty() : this(path: 'http://localhost:8080/');

Uri get url => Uri.parse(path);

RemoteSpec.fromMap(Map<String, dynamic> map)
RemoteSpec.fromMap(super.map)
: headerDelegate =
map['headerDelegate'] ?? const RemoteSpecHeaderDelegate(),
super.fromMap(map);
super.fromMap();

@override
String toString() {
Expand Down Expand Up @@ -360,11 +360,11 @@ class AWSRemoteSpecHeaderDelegate extends RemoteSpecHeaderDelegate {
this.accessKeyId,
}) : super();

AWSRemoteSpecHeaderDelegate.fromMap(Map<String, dynamic> map)
AWSRemoteSpecHeaderDelegate.fromMap(super.map)
: bucket = map['bucket'],
accessKeyId = map['accessKeyId'],
secretAccessKey = map['secretAccessKey'],
super.fromMap(map);
super.fromMap();

/// Generates the [header] map used within the GET request.
///
Expand Down Expand Up @@ -686,47 +686,29 @@ class DioProperties extends AdditionalProperties {
{this.dateLibrary,
this.nullableFields,
this.serializationLibrary,
bool allowUnicodeIdentifiers = false,
bool ensureUniqueParams = true,
bool prependFormOrBodyParameters = false,
String? pubAuthor,
String? pubAuthorEmail,
String? pubDescription,
String? pubHomepage,
String? pubName,
String? pubVersion,
String? pubPublishTo,
bool sortModelPropertiesByRequiredFlag = true,
bool sortParamsByRequiredFlag = true,
bool useEnumExtension = true,
bool enumUnknownDefaultCase = false,
String? sourceFolder,
Wrapper wrapper = Wrapper.none})
: super(
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
ensureUniqueParams: ensureUniqueParams,
prependFormOrBodyParameters: prependFormOrBodyParameters,
pubAuthor: pubAuthor,
pubAuthorEmail: pubAuthorEmail,
pubDescription: pubDescription,
pubHomepage: pubHomepage,
pubName: pubName,
pubVersion: pubVersion,
pubPublishTo: pubPublishTo,
sortModelPropertiesByRequiredFlag:
sortModelPropertiesByRequiredFlag,
sortParamsByRequiredFlag: sortParamsByRequiredFlag,
sourceFolder: sourceFolder,
useEnumExtension: useEnumExtension,
enumUnknownDefaultCase: enumUnknownDefaultCase,
wrapper: wrapper);

DioProperties.fromMap(Map<String, dynamic> map)
bool super.allowUnicodeIdentifiers,
bool super.ensureUniqueParams,
bool super.prependFormOrBodyParameters,
super.pubAuthor,
super.pubAuthorEmail,
super.pubDescription,
super.pubHomepage,
super.pubName,
super.pubVersion,
super.pubPublishTo,
bool super.sortModelPropertiesByRequiredFlag,
bool super.sortParamsByRequiredFlag,
bool super.useEnumExtension = true,
super.enumUnknownDefaultCase,
super.sourceFolder,
super.wrapper});

DioProperties.fromMap(super.map)
: dateLibrary = EnumTransformer.dioDateLibrary(map['dateLibrary']),
nullableFields = map['nullableFields'],
serializationLibrary = EnumTransformer.dioSerializationLibrary(
map['serializationLibrary']),
super.fromMap(map);
super.fromMap();

@override
Map<String, dynamic> toMap() => Map.from(super.toMap())
Expand Down Expand Up @@ -781,46 +763,28 @@ class DioAltProperties extends AdditionalProperties {
{this.pubspecDependencies,
this.pubspecDevDependencies,
this.listAnyOf,
bool allowUnicodeIdentifiers = false,
bool ensureUniqueParams = true,
bool prependFormOrBodyParameters = false,
String? pubAuthor,
String? pubAuthorEmail,
String? pubDescription,
String? pubHomepage,
String? pubName,
String? pubVersion,
String? pubPublishTo,
bool sortModelPropertiesByRequiredFlag = true,
bool sortParamsByRequiredFlag = true,
bool useEnumExtension = true,
bool enumUnknownDefaultCase = false,
String? sourceFolder,
Wrapper wrapper = Wrapper.none})
: super(
allowUnicodeIdentifiers: allowUnicodeIdentifiers,
ensureUniqueParams: ensureUniqueParams,
prependFormOrBodyParameters: prependFormOrBodyParameters,
pubAuthor: pubAuthor,
pubAuthorEmail: pubAuthorEmail,
pubDescription: pubDescription,
pubHomepage: pubHomepage,
pubName: pubName,
pubVersion: pubVersion,
pubPublishTo: pubPublishTo,
sortModelPropertiesByRequiredFlag:
sortModelPropertiesByRequiredFlag,
sortParamsByRequiredFlag: sortParamsByRequiredFlag,
sourceFolder: sourceFolder,
useEnumExtension: useEnumExtension,
enumUnknownDefaultCase: enumUnknownDefaultCase,
wrapper: wrapper);

DioAltProperties.fromMap(Map<String, dynamic> map)
bool super.allowUnicodeIdentifiers,
bool super.ensureUniqueParams,
bool super.prependFormOrBodyParameters,
super.pubAuthor,
super.pubAuthorEmail,
super.pubDescription,
super.pubHomepage,
super.pubName,
super.pubVersion,
super.pubPublishTo,
bool super.sortModelPropertiesByRequiredFlag,
bool super.sortParamsByRequiredFlag,
bool super.useEnumExtension = true,
super.enumUnknownDefaultCase,
super.sourceFolder,
super.wrapper});

DioAltProperties.fromMap(super.map)
: listAnyOf = map['listAnyOf'],
pubspecDependencies = map['pubspecDependencies'],
pubspecDevDependencies = map['pubspecDevDependencies'],
super.fromMap(map);
super.fromMap();

@override
Map<String, dynamic> toMap() => Map.from(super.toMap())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: openapi_generator_annotations
description: Annotation package for openapi_generator https://pub.dev/packages/openapi_generator.
version: 6.1.0
version: 6.1.1
homepage: https://github.com/gibahjoe/openapi-generator-dart

resolution: workspace

environment:
sdk: '>=2.12.0 <4.0.0'
sdk: '>=3.5.0 <4.0.0'

dependencies:
crypto: '>=3.0.6 <=4.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ void main() {
expect(options.refactorAllofInlineSchemas, isTrue);
expect(options.resolveInlineEnums, isTrue);

[options.arrayItemSuffix, options.mapItemSuffix]
.forEach((element) => expect(element, isNull));
for (var element in [options.arrayItemSuffix, options.mapItemSuffix]) {
expect(element, isNull);
}
});
test('toMap', () {
final options = InlineSchemaOptions();
Expand All @@ -20,8 +21,9 @@ void main() {
expect(map['refactorAllofInlineSchemas'], isTrue);
expect(map['resolveInlineEnums'], isTrue);

['arrayItemSuffix', 'mapItemSuffix']
.forEach((element) => expect(map.containsKey(element), isFalse));
for (var element in ['arrayItemSuffix', 'mapItemSuffix']) {
expect(map.containsKey(element), isFalse);
}
});
test('fromMap', () {
final options =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,6 @@ void main() {

extension StringExtension on String {
String removeln() {
return this.replaceAll('\n', '');
return replaceAll('\n', '');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:crypto/crypto.dart';
import 'package:meta/meta.dart';

@visibleForTesting
final awsSign = (String aKey, String sKey, String b, String p, DateTime n) {
String awsSign(String aKey, String sKey, String b, String p, DateTime n) {
// https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationExamples
String toSign = [
'GET',
Expand All @@ -20,4 +20,4 @@ final awsSign = (String aKey, String sKey, String b, String p, DateTime n) {
final signature =
base64Encode(Hmac(sha1, utf8AKey).convert(utf8ToSign).bytes);
return 'AWS $aKey:$signature';
};
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: openapi_generator_cli
description: A dart wrapper around openapi-generator inspired by the node implementation.
version: 6.1.0
version: 6.1.1
homepage: https://github.com/gibahjoe/openapi-generator-dart
resolution: workspace

environment:
sdk: '>=2.12.0 <4.0.0'
sdk: '>=3.5.0 <4.0.0'

dependencies:
http: '>=1.2.2 <=2.0.0'
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// Support for doing something awesome.
///
/// More dartdocs go here.
library openapi_generator;
library;
Loading
Loading