diff --git a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache index 71025d946997..cdc954502fd6 100644 --- a/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache +++ b/modules/openapi-generator/src/main/resources/swift5/modelObject.mustache @@ -11,13 +11,13 @@ {{#validatable}} {{#hasValidation}} {{#isString}} - static let {{{name}}}Rule = StringRule(minLength: {{#minLength}}{{{.}}}{{/minLength}}{{^minLength}}nil{{/minLength}}, maxLength: {{#maxLength}}{{{.}}}{{/maxLength}}{{^maxLength}}nil{{/maxLength}}, pattern: {{#pattern}}"{{{.}}}"{{/pattern}}{{^pattern}}nil{{/pattern}}) + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static let {{{name}}}Rule = StringRule(minLength: {{#minLength}}{{{.}}}{{/minLength}}{{^minLength}}nil{{/minLength}}, maxLength: {{#maxLength}}{{{.}}}{{/maxLength}}{{^maxLength}}nil{{/maxLength}}, pattern: {{#pattern}}"{{{.}}}"{{/pattern}}{{^pattern}}nil{{/pattern}}) {{/isString}} {{#isNumeric}} - static let {{{name}}}Rule = NumericRule<{{{dataType}}}>(minimum: {{#minimum}}{{{.}}}{{/minimum}}{{^minimum}}nil{{/minimum}}, exclusiveMinimum: {{#exclusiveMinimum}}true{{/exclusiveMinimum}}{{^exclusiveMinimum}}false{{/exclusiveMinimum}}, maximum: {{#maximum}}{{{.}}}{{/maximum}}{{^maximum}}nil{{/maximum}}, exclusiveMaximum: {{#exclusiveMaximum}}true{{/exclusiveMaximum}}{{^exclusiveMaximum}}false{{/exclusiveMaximum}}, multipleOf: {{#multipleOf}}{{{.}}}{{/multipleOf}}{{^multipleOf}}nil{{/multipleOf}}) + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static let {{{name}}}Rule = NumericRule<{{{dataType}}}>(minimum: {{#minimum}}{{{.}}}{{/minimum}}{{^minimum}}nil{{/minimum}}, exclusiveMinimum: {{#exclusiveMinimum}}true{{/exclusiveMinimum}}{{^exclusiveMinimum}}false{{/exclusiveMinimum}}, maximum: {{#maximum}}{{{.}}}{{/maximum}}{{^maximum}}nil{{/maximum}}, exclusiveMaximum: {{#exclusiveMaximum}}true{{/exclusiveMaximum}}{{^exclusiveMaximum}}false{{/exclusiveMaximum}}, multipleOf: {{#multipleOf}}{{{.}}}{{/multipleOf}}{{^multipleOf}}nil{{/multipleOf}}) {{/isNumeric}} {{#isArray}} - static let {{{name}}}Rule = ArrayRule(minItems: {{#minItems}}{{{.}}}{{/minItems}}{{^minItems}}nil{{/minItems}}, maxItems: {{#maxItems}}{{{.}}}{{/maxItems}}{{^maxItems}}nil{{/maxItems}}, uniqueItems: {{#uniqueItems}}true{{/uniqueItems}}{{^uniqueItems}}false{{/uniqueItems}}) + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static let {{{name}}}Rule = ArrayRule(minItems: {{#minItems}}{{{.}}}{{/minItems}}{{^minItems}}nil{{/minItems}}, maxItems: {{#maxItems}}{{{.}}}{{/maxItems}}{{^maxItems}}nil{{/maxItems}}, uniqueItems: {{#uniqueItems}}true{{/uniqueItems}}{{^uniqueItems}}false{{/uniqueItems}}) {{/isArray}} {{/hasValidation}} {{/validatable}} diff --git a/modules/openapi-generator/src/main/resources/swift6/modelObject.mustache b/modules/openapi-generator/src/main/resources/swift6/modelObject.mustache index c00584f6e57f..fa2f3c7c32d6 100644 --- a/modules/openapi-generator/src/main/resources/swift6/modelObject.mustache +++ b/modules/openapi-generator/src/main/resources/swift6/modelObject.mustache @@ -11,13 +11,13 @@ {{#validatable}} {{#hasValidation}} {{#isString}} - static let {{{name}}}Rule = StringRule(minLength: {{#minLength}}{{{.}}}{{/minLength}}{{^minLength}}nil{{/minLength}}, maxLength: {{#maxLength}}{{{.}}}{{/maxLength}}{{^maxLength}}nil{{/maxLength}}, pattern: {{#pattern}}"{{{.}}}"{{/pattern}}{{^pattern}}nil{{/pattern}}) + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static let {{{name}}}Rule = StringRule(minLength: {{#minLength}}{{{.}}}{{/minLength}}{{^minLength}}nil{{/minLength}}, maxLength: {{#maxLength}}{{{.}}}{{/maxLength}}{{^maxLength}}nil{{/maxLength}}, pattern: {{#pattern}}"{{{.}}}"{{/pattern}}{{^pattern}}nil{{/pattern}}) {{/isString}} {{#isNumeric}} - static let {{{name}}}Rule = NumericRule<{{{dataType}}}>(minimum: {{#minimum}}{{{.}}}{{/minimum}}{{^minimum}}nil{{/minimum}}, exclusiveMinimum: {{#exclusiveMinimum}}true{{/exclusiveMinimum}}{{^exclusiveMinimum}}false{{/exclusiveMinimum}}, maximum: {{#maximum}}{{{.}}}{{/maximum}}{{^maximum}}nil{{/maximum}}, exclusiveMaximum: {{#exclusiveMaximum}}true{{/exclusiveMaximum}}{{^exclusiveMaximum}}false{{/exclusiveMaximum}}, multipleOf: {{#multipleOf}}{{{.}}}{{/multipleOf}}{{^multipleOf}}nil{{/multipleOf}}) + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static let {{{name}}}Rule = NumericRule<{{{dataType}}}>(minimum: {{#minimum}}{{{.}}}{{/minimum}}{{^minimum}}nil{{/minimum}}, exclusiveMinimum: {{#exclusiveMinimum}}true{{/exclusiveMinimum}}{{^exclusiveMinimum}}false{{/exclusiveMinimum}}, maximum: {{#maximum}}{{{.}}}{{/maximum}}{{^maximum}}nil{{/maximum}}, exclusiveMaximum: {{#exclusiveMaximum}}true{{/exclusiveMaximum}}{{^exclusiveMaximum}}false{{/exclusiveMaximum}}, multipleOf: {{#multipleOf}}{{{.}}}{{/multipleOf}}{{^multipleOf}}nil{{/multipleOf}}) {{/isNumeric}} {{#isArray}} - static let {{{name}}}Rule = ArrayRule(minItems: {{#minItems}}{{{.}}}{{/minItems}}{{^minItems}}nil{{/minItems}}, maxItems: {{#maxItems}}{{{.}}}{{/maxItems}}{{^maxItems}}nil{{/maxItems}}, uniqueItems: {{#uniqueItems}}true{{/uniqueItems}}{{^uniqueItems}}false{{/uniqueItems}}) + {{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} static let {{{name}}}Rule = ArrayRule(minItems: {{#minItems}}{{{.}}}{{/minItems}}{{^minItems}}nil{{/minItems}}, maxItems: {{#maxItems}}{{{.}}}{{/maxItems}}{{^maxItems}}nil{{/maxItems}}, uniqueItems: {{#uniqueItems}}true{{/uniqueItems}}{{^uniqueItems}}false{{/uniqueItems}}) {{/isArray}} {{/hasValidation}} {{/validatable}} diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 1d15c6b37743..989ee57e466f 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -12,13 +12,13 @@ import AnyCodable public struct FormatTest: Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f36abb2bcd60..768534cc53d9 100644 --- a/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/asyncAwaitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -12,13 +12,13 @@ import AnyCodable public struct FormatTest: Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f36abb2bcd60..768534cc53d9 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -12,13 +12,13 @@ import AnyCodable public struct FormatTest: Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 48248f47cf3a..5cea4969d1fb 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -12,13 +12,13 @@ import AnyCodable public struct FormatTest: Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 899d354127a6..0127ee2bbd03 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -17,7 +17,7 @@ public struct Pet: Codable, JSONEncodable, Hashable { case pending = "pending" case sold = "sold" } - static let photoUrlsRule = ArrayRule(minItems: nil, maxItems: nil, uniqueItems: true) + public static let photoUrlsRule = ArrayRule(minItems: nil, maxItems: nil, uniqueItems: true) public var id: Int64? public var category: Category? public var name: String diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 0e1f9058cb3c..9b5c9083ae4a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -12,13 +12,13 @@ import AnyCodable @objcMembers public class FormatTest: NSObject, Codable, JSONEncodable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var integerNum: NSNumber? { get { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f36abb2bcd60..768534cc53d9 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -12,13 +12,13 @@ import AnyCodable public struct FormatTest: Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 7b62c973d425..0517ea824b4f 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -12,13 +12,13 @@ import AnyCodable internal struct FormatTest: Codable, JSONEncodable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + internal static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + internal static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + internal static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + internal static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + internal static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + internal static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + internal static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) internal private(set) var integer: Int? internal private(set) var int32: Int? internal private(set) var int64: Int64? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index f36abb2bcd60..768534cc53d9 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -12,13 +12,13 @@ import AnyCodable public struct FormatTest: Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift index a4d90bfe6f70..3857b3575b27 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift @@ -17,13 +17,13 @@ extension PetstoreClientAPI { public final class FormatTest: Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift index 5eb857cb6a95..d7a57ed42503 100644 --- a/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift +++ b/samples/client/petstore/swift5/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift @@ -12,8 +12,8 @@ import AnyCodable public struct Banana: Codable, JSONEncodable, Hashable { - static let countRule = NumericRule(minimum: 10, exclusiveMinimum: true, maximum: 100, exclusiveMaximum: true, multipleOf: 5) - static let idsRule = ArrayRule(minItems: 1, maxItems: 10, uniqueItems: false) + public static let countRule = NumericRule(minimum: 10, exclusiveMinimum: true, maximum: 100, exclusiveMaximum: true, multipleOf: 5) + public static let idsRule = ArrayRule(minItems: 1, maxItems: 10, uniqueItems: false) public var count: Int? public var ids: [Int]? diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift index ea3dde72f1e0..7cb3629e5f4a 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift @@ -13,13 +13,13 @@ import Vapor public final class FormatTest: Content, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift index 7a30afd16d2b..5c6053b5fef6 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift @@ -18,7 +18,7 @@ public final class Pet: Content, Hashable { case pending = "pending" case sold = "sold" } - static let photoUrlsRule = ArrayRule(minItems: nil, maxItems: nil, uniqueItems: true) + public static let photoUrlsRule = ArrayRule(minItems: nil, maxItems: nil, uniqueItems: true) public var id: Int64? public var category: Category? public var name: String diff --git a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/FormatTest.swift index 6be7a8c54836..3d80f272cc87 100644 --- a/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/alamofireLibrary/Sources/PetstoreClient/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Models/FormatTest.swift index dd542567ad80..578959cee5d3 100644 --- a/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/apiNonStaticMethod/Sources/PetstoreClient/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Models/FormatTest.swift index 54a1e5640a6e..3bfc12535c31 100644 --- a/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/asyncAwaitLibrary/Sources/PetstoreClient/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 54a1e5640a6e..3bfc12535c31 100644 --- a/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/combineDeferredLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Models/FormatTest.swift b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Models/FormatTest.swift index 54a1e5640a6e..3bfc12535c31 100644 --- a/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/combineLibrary/Sources/CombineLibrary/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Models/FormatTest.swift index b02ae5156498..0adfc5510036 100644 --- a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Models/Pet.swift b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Models/Pet.swift index 0518f378e107..b565e632a3e2 100644 --- a/samples/client/petstore/swift6/default/Sources/PetstoreClient/Models/Pet.swift +++ b/samples/client/petstore/swift6/default/Sources/PetstoreClient/Models/Pet.swift @@ -14,7 +14,7 @@ public struct Pet: Sendable, Codable, JSONEncodable, Hashable { case pending = "pending" case sold = "sold" } - static let photoUrlsRule = ArrayRule(minItems: nil, maxItems: nil, uniqueItems: true) + public static let photoUrlsRule = ArrayRule(minItems: nil, maxItems: nil, uniqueItems: true) public var id: Int64? public var category: Category? public var name: String diff --git a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Models/FormatTest.swift index b8e49bf4478d..601d5f418adf 100644 --- a/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/objcCompatible/Sources/PetstoreClient/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation @objcMembers public class FormatTest: NSObject, Codable, JSONEncodable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var integerNum: NSNumber? { get { diff --git a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 54a1e5640a6e..3bfc12535c31 100644 --- a/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index e0bce4b50066..6cc1faba0224 100644 --- a/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation internal struct FormatTest: Sendable, Codable, JSONEncodable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + internal static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + internal static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + internal static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + internal static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + internal static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + internal static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + internal static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) internal private(set) var integer: Int? internal private(set) var int32: Int? internal private(set) var int64: Int64? diff --git a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 54a1e5640a6e..3bfc12535c31 100644 --- a/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -9,13 +9,13 @@ import Foundation public struct FormatTest: Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift index 52bc27014622..e45cfbe07d9f 100644 --- a/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/urlsessionLibrary/Sources/PetstoreClient/Models/FormatTest.swift @@ -14,13 +14,13 @@ extension PetstoreClientAPI { public final class FormatTest: @unchecked Sendable, Codable, JSONEncodable, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public private(set) var integer: Int? public private(set) var int32: Int? public private(set) var int64: Int64? diff --git a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift index e38a08efb19f..5013d8f8d068 100644 --- a/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift +++ b/samples/client/petstore/swift6/validation/PetstoreClient/Classes/OpenAPIs/Models/Banana.swift @@ -9,8 +9,8 @@ import Foundation public struct Banana: Sendable, Codable, JSONEncodable, Hashable { - static let countRule = NumericRule(minimum: 10, exclusiveMinimum: true, maximum: 100, exclusiveMaximum: true, multipleOf: 5) - static let idsRule = ArrayRule(minItems: 1, maxItems: 10, uniqueItems: false) + public static let countRule = NumericRule(minimum: 10, exclusiveMinimum: true, maximum: 100, exclusiveMaximum: true, multipleOf: 5) + public static let idsRule = ArrayRule(minItems: 1, maxItems: 10, uniqueItems: false) public var count: Int? public var ids: [Int]? diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift index c1389aed7188..570ef7166630 100644 --- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift +++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/FormatTest.swift @@ -10,13 +10,13 @@ import Vapor public final class FormatTest: Content, Hashable { - static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) - static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) - static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) - static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) - static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) - static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") - static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) + public static let integerRule = NumericRule(minimum: 10, exclusiveMinimum: false, maximum: 100, exclusiveMaximum: false, multipleOf: nil) + public static let int32Rule = NumericRule(minimum: 20, exclusiveMinimum: false, maximum: 200, exclusiveMaximum: false, multipleOf: nil) + public static let numberRule = NumericRule(minimum: 32.1, exclusiveMinimum: false, maximum: 543.2, exclusiveMaximum: false, multipleOf: nil) + public static let floatRule = NumericRule(minimum: 54.3, exclusiveMinimum: false, maximum: 987.6, exclusiveMaximum: false, multipleOf: nil) + public static let doubleRule = NumericRule(minimum: 67.8, exclusiveMinimum: false, maximum: 123.4, exclusiveMaximum: false, multipleOf: nil) + public static let stringRule = StringRule(minLength: nil, maxLength: nil, pattern: "/[a-z]/i") + public static let passwordRule = StringRule(minLength: 10, maxLength: 64, pattern: nil) public var integer: Int? public var int32: Int? public var int64: Int64? diff --git a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift index 063415378890..04cffcaa7fc0 100644 --- a/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift +++ b/samples/client/petstore/swift6/vaporLibrary/Sources/PetstoreClient/Models/Pet.swift @@ -15,7 +15,7 @@ public final class Pet: Content, Hashable { case pending = "pending" case sold = "sold" } - static let photoUrlsRule = ArrayRule(minItems: nil, maxItems: nil, uniqueItems: true) + public static let photoUrlsRule = ArrayRule(minItems: nil, maxItems: nil, uniqueItems: true) public var id: Int64? public var category: Category? public var name: String