mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
chore/remove openapi assertion for dart 2 (#2916)
* chore(server): patch dart openapi assertion 2 * removed usused file
This commit is contained in:
parent
4311d385fc
commit
751922990f
93 changed files with 99 additions and 1102 deletions
|
|
@ -91,14 +91,14 @@ class {{{classname}}} {
|
|||
{{/isDateTime}}
|
||||
{{#isNullable}}
|
||||
} else {
|
||||
// json[r'{{{baseName}}}'] = null;
|
||||
// json[r'{{{baseName}}}'] = null;
|
||||
}
|
||||
{{/isNullable}}
|
||||
{{^isNullable}}
|
||||
{{^required}}
|
||||
{{^defaultValue}}
|
||||
} else {
|
||||
// json[r'{{{baseName}}}'] = null;
|
||||
// json[r'{{{baseName}}}'] = null;
|
||||
}
|
||||
{{/defaultValue}}
|
||||
{{/required}}
|
||||
|
|
@ -114,17 +114,6 @@ class {{{classname}}} {
|
|||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
// Ensure that the map contains the required keys.
|
||||
// Note 1: the values aren't checked for validity beyond being non-null.
|
||||
// Note 2: this code is stripped in release mode!
|
||||
assert(() {
|
||||
requiredKeys.forEach((key) {
|
||||
assert(json.containsKey(key), 'Required key "{{{classname}}}[$key]" is missing from JSON.');
|
||||
// assert(json[key] != null, 'Required key "{{{classname}}}[$key]" has a null value in JSON.');
|
||||
});
|
||||
return true;
|
||||
}());
|
||||
|
||||
return {{{classname}}}(
|
||||
{{#vars}}
|
||||
{{#isDateTime}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue