diff --git a/Sources/SwagGenKit/SwiftFormatter.swift b/Sources/SwagGenKit/SwiftFormatter.swift index c77cbc2f9..b237be6fe 100644 --- a/Sources/SwagGenKit/SwiftFormatter.swift +++ b/Sources/SwagGenKit/SwiftFormatter.swift @@ -130,13 +130,19 @@ public class SwiftFormatter: CodeFormatter { case .int16: return "Int16" case .int32: return "Int32" case .int64: return "Int64" + case .int: return "Int" case .uint8: return "UInt8" case .uint16: return "UInt16" case .uint32: return "UInt32" case .uint64: return "UInt64" + case .uint: return "UInt" } } else { - return "Int" + switch format { + case .int: return "Int" + case .uint: return "UInt" + default: return "Int" + } } case let .array(arraySchema): switch arraySchema.items { diff --git a/Sources/Swagger/Schema/IntegerSchema.swift b/Sources/Swagger/Schema/IntegerSchema.swift index 0f925d64c..645d2488e 100644 --- a/Sources/Swagger/Schema/IntegerSchema.swift +++ b/Sources/Swagger/Schema/IntegerSchema.swift @@ -28,10 +28,12 @@ public enum IntegerFormat: String { case int16 case int32 case int64 + case int case uint8 case uint16 case uint32 case uint64 + case uint } extension IntegerSchema {