Skip to content

Commit

Permalink
Add UInt Integer Type (#323)
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad Gorbenko <gorbenko_vy@itms.tech>
  • Loading branch information
mojidabckuu and Vlad Gorbenko committed Jun 19, 2023
1 parent 2b021b4 commit 61877cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Sources/SwagGenKit/SwiftFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions Sources/Swagger/Schema/IntegerSchema.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 61877cb

Please sign in to comment.