Skip to content

Commit

Permalink
chore(annotation): removed deprecated fields
Browse files Browse the repository at this point in the history
  • Loading branch information
gibahjoe committed Jan 16, 2024
1 parent b21a177 commit c5fd5e6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,6 @@ class Openapi {
/// -o, --output
final String? outputDirectory;

/// Specifies if the existing files should be overwritten during the generation
///
/// -s, --skip-overwrite
@Deprecated(
'Use .openapi-generator-ignore file to determine files that should not be overwritten')
final bool? overwriteExistingFiles;

/// Skips the default behavior of validating an input specification.
///
/// --skip-validate-spec
Expand Down Expand Up @@ -117,7 +110,6 @@ class Openapi {

const Openapi({
this.additionalProperties,
this.overwriteExistingFiles,
this.skipSpecValidation = false,
required this.inputSpec,
this.templateDirectory,
Expand Down Expand Up @@ -618,9 +610,7 @@ enum DioSerializationLibrary {
@Deprecated('Use [builtValue] instead.')
built_value,
builtValue,
jsonSerializable,
@Deprecated('Use [jsonSerializable] instead.')
json_serializable
jsonSerializable
}

enum SerializationFormat { JSON, PROTO }
Expand Down Expand Up @@ -681,7 +671,6 @@ class EnumTransformer {
static String dioSerializationLibraryName(DioSerializationLibrary lib) {
switch (lib) {
case DioSerializationLibrary.jsonSerializable:
case DioSerializationLibrary.json_serializable:
return 'json_serializable';
default:
return 'built_value';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ void main() {
generatorName: Generator.dart,
);
expect(props.additionalProperties, isNull);
expect(props.overwriteExistingFiles, isNull);
expect(props.skipSpecValidation, false);
expect(props.inputSpec!.path, InputSpec.json().path);
expect(props.inputSpec.path, InputSpec.json().path);
expect(props.templateDirectory, isNull);
expect(props.generatorName, Generator.dart);
expect(props.outputDirectory, isNull);
Expand Down
2 changes: 1 addition & 1 deletion openapi-generator/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
source_gen: '>=1.0.0 <=2.0.0'
path: '>=1.0.0 <=2.0.0'
openapi_generator_annotations: '>=4.13.0 <6.0.0'
analyzer: '>=2.0.0 <=6.9.9'
analyzer: '>=2.0.0 <7.0.0'
openapi_generator_cli: '>=4.13.0 <6.0.0'
yaml: ^3.1.2
http: '>=0.13.1 <=2.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import 'package:openapi_generator_annotations/openapi_generator_annotations.dart
pubAuthor: 'test author',
nullableFields: true),
inlineSchemaNameMappings: {'200resp': 'OkResp'},
overwriteExistingFiles: true,
projectPubspecPath: './test/specs/dart_pubspec.test.yaml',
)
class DioPropertiesTestConfig {}
2 changes: 0 additions & 2 deletions openapi-generator/test/test_annotations/test_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class TestGenerator extends src_gen.GeneratorForAnnotation<Openapi> {
// KEEP THIS IN LINE WITH THE FIELDS OF THE ANNOTATION CLASS
final fields = [
SupportedFields(name: 'additionalProperties', type: AdditionalProperties),
SupportedFields(
name: 'overwriteExistingFiles', isDeprecated: true, type: bool),
SupportedFields(name: 'skipSpecValidation', type: bool),
SupportedFields(name: 'inputSpec', isRequired: true, type: InputSpec),
SupportedFields(name: 'templateDirectory', type: String),
Expand Down

0 comments on commit c5fd5e6

Please sign in to comment.