Skip to content

Commit c5fd5e6

Browse files
committed
chore(annotation): removed deprecated fields
1 parent b21a177 commit c5fd5e6

File tree

5 files changed

+3
-18
lines changed

5 files changed

+3
-18
lines changed

openapi-generator-annotations/lib/src/openapi_generator_annotations_base.dart

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,6 @@ class Openapi {
5050
/// -o, --output
5151
final String? outputDirectory;
5252

53-
/// Specifies if the existing files should be overwritten during the generation
54-
///
55-
/// -s, --skip-overwrite
56-
@Deprecated(
57-
'Use .openapi-generator-ignore file to determine files that should not be overwritten')
58-
final bool? overwriteExistingFiles;
59-
6053
/// Skips the default behavior of validating an input specification.
6154
///
6255
/// --skip-validate-spec
@@ -117,7 +110,6 @@ class Openapi {
117110

118111
const Openapi({
119112
this.additionalProperties,
120-
this.overwriteExistingFiles,
121113
this.skipSpecValidation = false,
122114
required this.inputSpec,
123115
this.templateDirectory,
@@ -618,9 +610,7 @@ enum DioSerializationLibrary {
618610
@Deprecated('Use [builtValue] instead.')
619611
built_value,
620612
builtValue,
621-
jsonSerializable,
622-
@Deprecated('Use [jsonSerializable] instead.')
623-
json_serializable
613+
jsonSerializable
624614
}
625615

626616
enum SerializationFormat { JSON, PROTO }
@@ -681,7 +671,6 @@ class EnumTransformer {
681671
static String dioSerializationLibraryName(DioSerializationLibrary lib) {
682672
switch (lib) {
683673
case DioSerializationLibrary.jsonSerializable:
684-
case DioSerializationLibrary.json_serializable:
685674
return 'json_serializable';
686675
default:
687676
return 'built_value';

openapi-generator-annotations/test/openapi_generator_annotations_test.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ void main() {
1313
generatorName: Generator.dart,
1414
);
1515
expect(props.additionalProperties, isNull);
16-
expect(props.overwriteExistingFiles, isNull);
1716
expect(props.skipSpecValidation, false);
18-
expect(props.inputSpec!.path, InputSpec.json().path);
17+
expect(props.inputSpec.path, InputSpec.json().path);
1918
expect(props.templateDirectory, isNull);
2019
expect(props.generatorName, Generator.dart);
2120
expect(props.outputDirectory, isNull);

openapi-generator/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
source_gen: '>=1.0.0 <=2.0.0'
1212
path: '>=1.0.0 <=2.0.0'
1313
openapi_generator_annotations: '>=4.13.0 <6.0.0'
14-
analyzer: '>=2.0.0 <=6.9.9'
14+
analyzer: '>=2.0.0 <7.0.0'
1515
openapi_generator_cli: '>=4.13.0 <6.0.0'
1616
yaml: ^3.1.2
1717
http: '>=0.13.1 <=2.0.0'

openapi-generator/test/specs/dio_properties_test_config.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import 'package:openapi_generator_annotations/openapi_generator_annotations.dart
2020
pubAuthor: 'test author',
2121
nullableFields: true),
2222
inlineSchemaNameMappings: {'200resp': 'OkResp'},
23-
overwriteExistingFiles: true,
2423
projectPubspecPath: './test/specs/dart_pubspec.test.yaml',
2524
)
2625
class DioPropertiesTestConfig {}

openapi-generator/test/test_annotations/test_generator.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ class TestGenerator extends src_gen.GeneratorForAnnotation<Openapi> {
3333
// KEEP THIS IN LINE WITH THE FIELDS OF THE ANNOTATION CLASS
3434
final fields = [
3535
SupportedFields(name: 'additionalProperties', type: AdditionalProperties),
36-
SupportedFields(
37-
name: 'overwriteExistingFiles', isDeprecated: true, type: bool),
3836
SupportedFields(name: 'skipSpecValidation', type: bool),
3937
SupportedFields(name: 'inputSpec', isRequired: true, type: InputSpec),
4038
SupportedFields(name: 'templateDirectory', type: String),

0 commit comments

Comments
 (0)