Skip to content

Commit

Permalink
1.16.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Carapacik committed Mar 3, 2024
1 parent 3cbaf5f commit bb6e086
Show file tree
Hide file tree
Showing 33 changed files with 371 additions and 377 deletions.
4 changes: 4 additions & 0 deletions swagger_parser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.16.4

- Fixed errors with `required_by_default`

## 1.16.3

- Temporary fix for ([#110](https://github.com/Carapacik/swagger_parser/issues/110))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../config/generator_config.dart';
import '../model/generated_file.dart';
import '../model/programming_language.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import '../../config/config_processor.dart';
import '../../config/swp_config.dart';
import '../../parser/swagger_parser_core.dart';
import '../../utils/type_utils.dart';
import '../model/generated_file.dart';
import '../model/generation_statistic.dart';
import 'generator.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:collection/collection.dart';

import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../model/json_serializer.dart';
import '../model/programming_language.dart';
import 'dart_import_dto_template.dart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import 'package:collection/collection.dart';

import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../model/json_serializer.dart';
import 'dart_import_dto_template.dart';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../../utils/utils.dart';
import '../../utils/base_utils.dart';
import '../model/generated_file.dart';

/// Provides template for generating dart export file
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:collection/collection.dart';

import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../model/programming_language.dart';

/// Provides template for generating dart DTO using freezed
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:collection/collection.dart';

import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../model/programming_language.dart';

/// Provides template for generating dart DTO using JSON serializable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:collection/collection.dart';

import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../model/programming_language.dart';

/// Provides template for generating dart Retrofit client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../utils/utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';

String dartRootClientTemplate({
required OpenApiInfo openApiInfo,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:collection/collection.dart';

import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../model/programming_language.dart';

/// Provides template for generating dart typedefs using JSON serializable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:collection/collection.dart';

import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../utils/utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';

/// Provides template for generating kotlin enum DTO
String kotlinEnumDtoTemplate(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../model/programming_language.dart';

/// Provides template for generating kotlin DTO using Moshi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../model/programming_language.dart';

/// Return file contents for kotlin retrofit client
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'package:collection/collection.dart';

import '../../parser/swagger_parser_core.dart';
import '../../utils/case_utils.dart';
import '../../parser/utils/case_utils.dart';
import '../../utils/base_utils.dart';
import '../../utils/type_utils.dart';
import '../../utils/utils.dart';
import '../model/programming_language.dart';

/// Provides template for generating dart typedefs using JSON serializable
Expand Down
2 changes: 1 addition & 1 deletion swagger_parser/lib/src/parser/model/replacement_rule.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:meta/meta.dart';

import '../../utils/case_utils.dart';
import '../utils/case_utils.dart';

/// Used to store regex patterns for replacing names during generation
@immutable
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:collection/collection.dart';
import 'package:meta/meta.dart';

import '../../utils/type_utils.dart';
import '../utils/type_utils.dart';
import 'universal_type.dart';

part 'universal_component_class.dart';
Expand Down
13 changes: 2 additions & 11 deletions swagger_parser/lib/src/parser/model/universal_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ final class UniversalType {
this.defaultValue,
this.nullable = false,
this.wrappingCollections = const [],
this.arrayValueNullable = false,
this.enumType,
});

Expand Down Expand Up @@ -55,9 +54,6 @@ final class UniversalType {
/// List<List<Object>>
final List<UniversalCollections> wrappingCollections;

/// Whether or not this field is nullable
final bool arrayValueNullable;

/// Whether or not this field is nullable
final bool nullable;

Expand All @@ -73,7 +69,6 @@ final class UniversalType {
String? enumType,
List<UniversalCollections>? wrappingCollections,
bool? nullable,
bool? arrayValueNullable,
}) {
return UniversalType(
type: type ?? this.type,
Expand All @@ -86,7 +81,6 @@ final class UniversalType {
enumType: enumType ?? this.enumType,
wrappingCollections: wrappingCollections ?? this.wrappingCollections,
nullable: nullable ?? this.nullable,
arrayValueNullable: arrayValueNullable ?? this.arrayValueNullable,
);
}

Expand Down Expand Up @@ -115,8 +109,7 @@ final class UniversalType {
enumType == other.enumType &&
const DeepCollectionEquality()
.equals(wrappingCollections, other.wrappingCollections) &&
nullable == other.nullable &&
arrayValueNullable == other.arrayValueNullable;
nullable == other.nullable;

@override
int get hashCode =>
Expand All @@ -129,8 +122,7 @@ final class UniversalType {
isRequired.hashCode ^
enumType.hashCode ^
wrappingCollections.hashCode ^
nullable.hashCode ^
arrayValueNullable.hashCode;
nullable.hashCode;

@override
String toString() => 'UniversalType(type: $type, '
Expand All @@ -141,6 +133,5 @@ final class UniversalType {
'isRequired: $isRequired, '
'enumType: $enumType, '
'wrappingCollections: $wrappingCollections, '
'arrayValueNullable: $arrayValueNullable, '
'nullable: $nullable)';
}
Loading

0 comments on commit bb6e086

Please sign in to comment.