diff --git a/Sources/Swagger/Schema/StringSchema.swift b/Sources/Swagger/Schema/StringSchema.swift index 00930553e..46cbdf891 100644 --- a/Sources/Swagger/Schema/StringSchema.swift +++ b/Sources/Swagger/Schema/StringSchema.swift @@ -4,6 +4,7 @@ public struct StringSchema { public let format: StringFormat? public let maxLength: Int? public let minLength: Int? + public let pattern: String? } public enum StringFormat: RawRepresentable { @@ -48,5 +49,6 @@ extension StringSchema { format = jsonDictionary.json(atKeyPath: "format") maxLength = jsonDictionary.json(atKeyPath: "maxLength") minLength = (jsonDictionary.json(atKeyPath: "minLength")) ?? 0 + pattern = jsonDictionary.json(atKeyPath: "pattern") } }