mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(server,web) Semantic import path validation (#7076)
* add library validation api * chore: open api * show warning i UI * add flex row * fix e2e * tests * fix tests * enforce path validation * enforce validation on refresh * return 400 on bad import path * add limits to import paths * set response code to 200 * fix e2e * fix lint * fix test * restore e2e folder * fix import * use startsWith * icon color * notify user of failed validation * add parent div to validation * add docs to the import validation * improve library troubleshooting docs * fix button alignment --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
e7a875eadd
commit
b3c7bebbd4
32 changed files with 1472 additions and 75 deletions
5
mobile/openapi/test/library_api_test.dart
generated
5
mobile/openapi/test/library_api_test.dart
generated
|
|
@ -57,5 +57,10 @@ void main() {
|
|||
// TODO
|
||||
});
|
||||
|
||||
//Future<ValidateLibraryResponseDto> validate(String id, ValidateLibraryDto validateLibraryDto) async
|
||||
test('test validate', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
|||
32
mobile/openapi/test/validate_library_dto_test.dart
generated
Normal file
32
mobile/openapi/test/validate_library_dto_test.dart
generated
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for ValidateLibraryDto
|
||||
void main() {
|
||||
// final instance = ValidateLibraryDto();
|
||||
|
||||
group('test ValidateLibraryDto', () {
|
||||
// List<String> exclusionPatterns (default value: const [])
|
||||
test('to test the property `exclusionPatterns`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// List<String> importPaths (default value: const [])
|
||||
test('to test the property `importPaths`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
37
mobile/openapi/test/validate_library_import_path_response_dto_test.dart
generated
Normal file
37
mobile/openapi/test/validate_library_import_path_response_dto_test.dart
generated
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for ValidateLibraryImportPathResponseDto
|
||||
void main() {
|
||||
// final instance = ValidateLibraryImportPathResponseDto();
|
||||
|
||||
group('test ValidateLibraryImportPathResponseDto', () {
|
||||
// String importPath
|
||||
test('to test the property `importPath`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// bool isValid (default value: false)
|
||||
test('to test the property `isValid`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String message
|
||||
test('to test the property `message`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
27
mobile/openapi/test/validate_library_response_dto_test.dart
generated
Normal file
27
mobile/openapi/test/validate_library_response_dto_test.dart
generated
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
// tests for ValidateLibraryResponseDto
|
||||
void main() {
|
||||
// final instance = ValidateLibraryResponseDto();
|
||||
|
||||
group('test ValidateLibraryResponseDto', () {
|
||||
// List<ValidateLibraryImportPathResponseDto> importPaths (default value: const [])
|
||||
test('to test the property `importPaths`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue