Skip to content

Commit

Permalink
fix typo minium
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Dec 30, 2024
1 parent 7651e2b commit c159b9f
Show file tree
Hide file tree
Showing 32 changed files with 178 additions and 178 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -212,4 +212,4 @@ open class {{classname}} {
}
{{/operation}}
}
{{/operations}}
{{/operations}}
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ import Foundation
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ import Foundation
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ extension NumericRule: Sendable where T: Sendable {}
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -110,11 +110,11 @@ extension NumericRule: Sendable where T: Sendable {}
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Pet, Error>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Void, Error>
Expand Down Expand Up @@ -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<Void, Error>
Expand Down Expand Up @@ -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<Void, Error>
Expand Down Expand Up @@ -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<Void, Error>
Expand Down Expand Up @@ -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<Void, Error>
open func logoutUser() -> AnyPublisher<Void, Error> {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ public struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
public static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ internal struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
internal static func validate<T: Comparable & BinaryInteger>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down Expand Up @@ -109,11 +109,11 @@ internal struct Validator {
/// - Throws: `ValidationError<NumericValidationErrorKind>` if the numeric is invalid against the rule.
internal static func validate<T: Comparable & FloatingPoint>(_ numeric: T, against rule: NumericRule<T>) throws -> T {
var error = ValidationError<NumericValidationErrorKind>(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)
}
}
Expand Down
Loading

0 comments on commit c159b9f

Please sign in to comment.