Skip to content

Commit

Permalink
fix(CompareComplyV1): Give more appropriate types to model properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Oliveri committed Dec 6, 2018
1 parent 25b95be commit 4b1af08
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Source/CompareComplyV1/Models/BatchStatus.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ public struct BatchStatus: Codable, Equatable {
/**
The creation time of the batch request.
*/
public var created: String?
public var created: Date?

/**
The time of the most recent update to the batch request.
*/
public var updated: String?
public var updated: Date?

// Map each property name to the key that shall be used for encoding/decoding.
private enum CodingKeys: String, CodingKey {
Expand Down
7 changes: 4 additions & 3 deletions Source/CompareComplyV1/Models/ColumnHeaders.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
**/

import Foundation
import RestKit

/**
Column-level cells, each applicable as a header to other cells in the same column as itself, of the current table.
Expand All @@ -28,10 +29,10 @@ public struct ColumnHeaders: Codable, Equatable {
public var cellID: String?

/**
The numeric location of the identified element in the document, represented with two integers labeled `begin` and
`end`.
The location of the column header cell in the current table as defined by its `begin` and `end` offsets,
respectfully, in the input document.
*/
public var location: Location?
public var location: [String: JSON]?

/**
The textual contents of this cell from the input document without associated markup content.
Expand Down
2 changes: 1 addition & 1 deletion Source/CompareComplyV1/Models/FeedbackReturn.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public struct FeedbackReturn: Codable, Equatable {
/**
Timestamp listing the creation time of the feedback submission.
*/
public var created: String?
public var created: Date?

/**
Information returned from the `POST /v1/feedback` method.
Expand Down
2 changes: 1 addition & 1 deletion Source/CompareComplyV1/Models/GetFeedback.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public struct GetFeedback: Codable, Equatable {
/**
A timestamp identifying the creation time of the feedback entry.
*/
public var created: String?
public var created: Date?

/**
A string containing the user's comment about the feedback entry.
Expand Down
8 changes: 4 additions & 4 deletions Source/CompareComplyV1/Models/Location.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ public struct Location: Codable, Equatable {
/**
The element's `begin` index.
*/
public var begin: Int?
public var begin: Int

/**
The element's `end` index.
*/
public var end: Int?
public var end: Int

// Map each property name to the key that shall be used for encoding/decoding.
private enum CodingKeys: String, CodingKey {
Expand All @@ -47,8 +47,8 @@ public struct Location: Codable, Equatable {
- returns: An initialized `Location`.
*/
public init(
begin: Int? = nil,
end: Int? = nil
begin: Int,
end: Int
)
{
self.begin = begin
Expand Down
2 changes: 1 addition & 1 deletion Source/CompareComplyV1/Models/SectionTitles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public struct SectionTitles: Codable, Equatable {
public var level: Int?

/**
An array of `location` objects listing the locations of detected section titles.
An array of `location` objects listing the locations of detected leading sentences.
*/
public var elementLocations: [ElementLocations]?

Expand Down
7 changes: 4 additions & 3 deletions Source/CompareComplyV1/Models/TableHeaders.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
**/

import Foundation
import RestKit

/**
The contents of the current table's header.
Expand All @@ -28,10 +29,10 @@ public struct TableHeaders: Codable, Equatable {
public var cellID: String?

/**
The numeric location of the identified element in the document, represented with two integers labeled `begin` and
`end`.
The location of the table header cell in the current table as defined by its `begin` and `end` offsets,
respectfully, in the input document.
*/
public var location: Location?
public var location: [String: JSON]?

/**
The textual contents of the cell from the input document without associated markup content.
Expand Down

0 comments on commit 4b1af08

Please sign in to comment.