-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2350 from CruGlobal/develop
Merge develop into master
- Loading branch information
Showing
5 changed files
with
111 additions
and
5 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...loadInitialResources/RequestOperation/Codable/JsonApi/ScriptJsonApiResponseBaseData.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// ScriptJsonApiResponseBaseData.swift | ||
// request-operation-ios | ||
// | ||
// Created by Levi Eggert on 5/29/2024. | ||
// Copyright © 2024 Cru. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// NOTE: This is copied from RequestOperation/Codable/JsonApi/JsonApiResponseBaseData.swift. | ||
// And is required for build phases script DownloadInitialResources ResourceModel.swift. | ||
// I had to remove the request-operation dependency from ResourceModel.swift because I couldn't figure out how to use external dependencies when running a script. ~Levi | ||
|
||
public struct ScriptJsonApiResponseBaseData: Codable { | ||
|
||
public let id: String | ||
public let type: String | ||
|
||
public enum CodingKeys: String, CodingKey { | ||
case id = "id" | ||
case type = "type" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...oadInitialResources/RequestOperation/Codable/JsonApi/ScriptJsonApiResponseDataArray.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// ScriptJsonApiResponseDataArray.swift | ||
// request-operation-ios | ||
// | ||
// Created by Levi Eggert on 5/29/2024. | ||
// Copyright © 2024 Cru. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// NOTE: This is copied from RequestOperation/Codable/JsonApi/JsonApiResponseDataArray.swift. | ||
// And is required for build phases script DownloadInitialResources ResourceModel.swift. | ||
// I had to remove the request-operation dependency from ResourceModel.swift because I couldn't figure out how to use external dependencies when running a script. ~Levi | ||
|
||
public struct ScriptJsonApiResponseDataArray<T: Codable>: Codable { | ||
|
||
public let dataArray: [T] | ||
|
||
public enum CodingKeys: String, CodingKey { | ||
case dataArray = "data" | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...adInitialResources/RequestOperation/Codable/JsonApi/ScriptJsonApiResponseDataObject.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// ScriptJsonApiResponseDataObject.swift | ||
// request-operation-ios | ||
// | ||
// Created by Levi Eggert on 5/29/2024. | ||
// Copyright © 2024 Cru. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
// NOTE: This is copied from RequestOperation/Codable/JsonApi/JsonApiResponseDataObject.swift. | ||
// And is required for build phases script DownloadInitialResources ResourceModel.swift. | ||
// I had to remove the request-operation dependency from ResourceModel.swift because I couldn't figure out how to use external dependencies when running a script. ~Levi | ||
|
||
public struct ScriptJsonApiResponseDataObject<T: Codable>: Codable { | ||
|
||
public let dataObject: T | ||
|
||
public enum CodingKeys: String, CodingKey { | ||
case dataObject = "data" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters