diff --git a/modules/openapi-generator/src/main/resources/swift-combine/api.mustache b/modules/openapi-generator/src/main/resources/swift-combine/api.mustache index db49e368692d..187ab989a8d9 100644 --- a/modules/openapi-generator/src/main/resources/swift-combine/api.mustache +++ b/modules/openapi-generator/src/main/resources/swift-combine/api.mustache @@ -74,7 +74,7 @@ open class {{classname}} { /// - defaultResponse: {{.}}{{/defaultResponse}} {{#authMethods}} /// - {{#isBasicBasic}}BASIC{{/isBasicBasic}}{{#isOAuth}}OAuth{{/isOAuth}}{{#isApiKey}}API Key{{/isApiKey}}: - /// - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeaer}}(HEADER){{/isKeyInHeaer}}{{/keyParamName}} + /// - type: {{type}}{{#keyParamName}} {{keyParamName}} {{#isKeyInQuery}}(QUERY){{/isKeyInQuery}}{{#isKeyInHeader}}(HEADER){{/isKeyInHeader}}{{/keyParamName}} /// - name: {{name}} {{/authMethods}} {{#hasResponseHeaders}} @@ -212,4 +212,4 @@ open class {{classname}} { } {{/operation}} } -{{/operations}} \ No newline at end of file +{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/swift5/Validation.mustache b/modules/openapi-generator/src/main/resources/swift5/Validation.mustache index 70e3abfb5057..91bbcf788555 100644 --- a/modules/openapi-generator/src/main/resources/swift5/Validation.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/Validation.mustache @@ -77,11 +77,11 @@ import Foundation /// - Throws: `ValidationError` if the numeric is invalid against the rule. {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ import Foundation /// - Throws: `ValidationError` if the numeric is invalid against the rule. {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/modules/openapi-generator/src/main/resources/swift6/Validation.mustache b/modules/openapi-generator/src/main/resources/swift6/Validation.mustache index 148a5123760d..2a2dab67d0c4 100644 --- a/modules/openapi-generator/src/main/resources/swift6/Validation.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/Validation.mustache @@ -78,11 +78,11 @@ extension NumericRule: Sendable where T: Sendable {} /// - Throws: `ValidationError` if the numeric is invalid against the rule. {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ extension NumericRule: Sendable where T: Sendable {} /// - Throws: `ValidationError` if the numeric is invalid against the rule. {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/PetAPI.swift b/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/PetAPI.swift index 94a82a25ec63..b299369a8996 100644 --- a/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/PetAPI.swift +++ b/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/PetAPI.swift @@ -273,7 +273,7 @@ open class PetAPI { /// - GET /pet/{petId} /// - Returns a single pet /// - API Key: - /// - type: apiKey api_key + /// - type: apiKey api_key (HEADER) /// - name: api_key /// - parameter petId: (path) ID of pet to return /// - returns: AnyPublisher diff --git a/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/StoreAPI.swift b/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/StoreAPI.swift index e0bd1eb56eb3..6277f998447b 100644 --- a/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/StoreAPI.swift @@ -88,7 +88,7 @@ open class StoreAPI { /// - GET /store/inventory /// - Returns a map of status codes to quantities /// - API Key: - /// - type: apiKey api_key + /// - type: apiKey api_key (HEADER) /// - name: api_key /// - returns: AnyPublisher<[String: Int], Error> open func getInventory() -> AnyPublisher<[String: Int], Error> { diff --git a/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/UserAPI.swift b/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/UserAPI.swift index cd0e6b0611f3..071f6d3fdcf2 100644 --- a/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/UserAPI.swift +++ b/samples/client/petstore/swift-combine/client/PetstoreOpenAPI/Sources/APIs/UserAPI.swift @@ -32,7 +32,7 @@ open class UserAPI { /// - POST /user /// - This can only be done by the logged in user. /// - API Key: - /// - type: apiKey api_key + /// - type: apiKey api_key (HEADER) /// - name: api_key /// - parameter user: (body) Created user object /// - returns: AnyPublisher @@ -68,7 +68,7 @@ open class UserAPI { /// - POST /user/createWithArray /// - /// - API Key: - /// - type: apiKey api_key + /// - type: apiKey api_key (HEADER) /// - name: api_key /// - parameter user: (body) List of user object /// - returns: AnyPublisher @@ -104,7 +104,7 @@ open class UserAPI { /// - POST /user/createWithList /// - /// - API Key: - /// - type: apiKey api_key + /// - type: apiKey api_key (HEADER) /// - name: api_key /// - parameter user: (body) List of user object /// - returns: AnyPublisher @@ -155,7 +155,7 @@ open class UserAPI { /// - DELETE /user/{username} /// - This can only be done by the logged in user. /// - API Key: - /// - type: apiKey api_key + /// - type: apiKey api_key (HEADER) /// - name: api_key /// - parameter username: (path) The name that needs to be deleted /// - returns: AnyPublisher @@ -309,7 +309,7 @@ open class UserAPI { /// - GET /user/logout /// - /// - API Key: - /// - type: apiKey api_key + /// - type: apiKey api_key (HEADER) /// - name: api_key /// - returns: AnyPublisher open func logoutUser() -> AnyPublisher { @@ -357,7 +357,7 @@ open class UserAPI { /// - PUT /user/{username} /// - This can only be done by the logged in user. /// - API Key: - /// - type: apiKey api_key + /// - type: apiKey api_key (HEADER) /// - name: api_key /// - parameter username: (path) name that need to be deleted /// - parameter user: (body) Updated user object diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/oneOf/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift index ced1069dd454..7591b5218353 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ internal struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. internal static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ internal struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. internal static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Validation.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Validation.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Validation.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Validation.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Validation.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Validation.swift index 6a0d4c9da1ab..3bf4ec03fea4 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Validation.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Validation.swift @@ -77,11 +77,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -109,11 +109,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Validation.swift b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/oneOf/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index f9a3750d668f..104b74903650 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ internal struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. internal static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ internal struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. internal static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift index f2824965ddfb..d4c743d96074 100644 --- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift +++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Infrastructure/Validation.swift @@ -78,11 +78,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } } @@ -110,11 +110,11 @@ public struct Validator { /// - Throws: `ValidationError` if the numeric is invalid against the rule. public static func validate(_ numeric: T, against rule: NumericRule) throws -> T { var error = ValidationError(kinds: []) - if let minium = rule.minimum { - if !rule.exclusiveMinimum, minium > numeric { + if let minimum = rule.minimum { + if !rule.exclusiveMinimum, minimum > numeric { error.kinds.insert(.minimum) } - if rule.exclusiveMinimum, minium >= numeric { + if rule.exclusiveMinimum, minimum >= numeric { error.kinds.insert(.minimum) } }