forked from loafle/openapi-generator-original
[swift6] Add checked Sendable conformance to Validation structs (#20150)
This commit is contained in:
parent
c06db15750
commit
2b891f6da9
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct StringRule: @unchecked Sendable {
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct StringRule: Sendable {
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var minLength: Int?
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var maxLength: Int?
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var pattern: String?
|
||||
}
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct NumericRule<T: Comparable & Numeric> {
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var minimum: T?
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var exclusiveMinimum = false
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var maximum: T?
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var exclusiveMaximum = false
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct ArrayRule: @unchecked Sendable {
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} struct ArrayRule: Sendable {
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var minItems: Int?
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var maxItems: Int?
|
||||
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
internal struct StringRule: @unchecked Sendable {
|
||||
internal struct StringRule: Sendable {
|
||||
internal var minLength: Int?
|
||||
internal var maxLength: Int?
|
||||
internal var pattern: String?
|
||||
}
|
||||
|
||||
internal struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
internal struct NumericRule<T: Comparable & Numeric> {
|
||||
internal var minimum: T?
|
||||
internal var exclusiveMinimum = false
|
||||
internal var maximum: T?
|
||||
internal var exclusiveMaximum = false
|
||||
internal var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
internal struct ArrayRule: @unchecked Sendable {
|
||||
internal struct ArrayRule: Sendable {
|
||||
internal var minItems: Int?
|
||||
internal var maxItems: Int?
|
||||
internal var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
@ -6,21 +6,22 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public struct StringRule: @unchecked Sendable {
|
||||
public struct StringRule: Sendable {
|
||||
public var minLength: Int?
|
||||
public var maxLength: Int?
|
||||
public var pattern: String?
|
||||
}
|
||||
|
||||
public struct NumericRule<T: Comparable & Numeric>: @unchecked Sendable {
|
||||
public struct NumericRule<T: Comparable & Numeric> {
|
||||
public var minimum: T?
|
||||
public var exclusiveMinimum = false
|
||||
public var maximum: T?
|
||||
public var exclusiveMaximum = false
|
||||
public var multipleOf: T?
|
||||
}
|
||||
extension NumericRule: Sendable where T: Sendable {}
|
||||
|
||||
public struct ArrayRule: @unchecked Sendable {
|
||||
public struct ArrayRule: Sendable {
|
||||
public var minItems: Int?
|
||||
public var maxItems: Int?
|
||||
public var uniqueItems: Bool
|
||||
|
Loading…
x
Reference in New Issue
Block a user