Skip to content

Commit fff3ecc

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents fbb4111 + 32d238c commit fff3ecc

File tree

289 files changed

+3405
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+3405
-46
lines changed

AsposeWordsCloud.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'AsposeWordsCloud'
3-
s.version = '23.8'
3+
s.version = '23.9'
44
s.summary = 'Aspose Words for Cloud.'
55
s.homepage = 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ This repository contains Aspose.Words Cloud SDK for Swift source code. This SDK
1313
* Watermarks and protection
1414
* Full read & write access to Document Object Model, including sections, paragraphs, text, images, tables, headers/footers and many others
1515

16+
## Enhancements in Version 23.9
17+
18+
- Support for class inheritance in responses from the server.
19+
20+
1621
## Enhancements in Version 23.6
1722

1823
- Fix XMLHttpRequest in web applications.
@@ -283,7 +288,7 @@ Add link to this repository as dependency to your Package.swift:
283288

284289
dependencies: [
285290
// Dependencies declare other packages that this package depends on.
286-
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "23.8"),
291+
.package(url: "https://github.com/aspose-words-cloud/aspose-words-cloud-swift", from: "23.9"),
287292
],
288293
targets: [
289294
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
@@ -301,7 +306,7 @@ targets: [
301306
Add link to git repository as dependency to your Podfile:
302307

303308
```ruby
304-
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '23.8'
309+
pod 'AsposeWordsCloud', :git => 'https://github.com/aspose-words-cloud/aspose-words-cloud-swift.git', :tag => '23.9'
305310
```
306311

307312
## Getting Started

Sources/AsposeWordsCloud/Api/ApiInvoker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public class ApiInvoker {
258258
var newAccessToken : String? = nil;
259259
if (response.errorCode == self.httpStatusCodeOK) {
260260
do {
261-
let result = try ObjectSerializer.deserialize(type: AccessTokenResult.self, from: response.data!);
261+
let result = try ObjectSerializer.deserializeInternal(type: AccessTokenResult.self, from: response.data!);
262262
if (result.access_token != nil) {
263263
newAccessToken = "Bearer " + result.access_token!;
264264
}

Sources/AsposeWordsCloud/Api/Configuration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,6 @@ public class Configuration : Codable {
188188

189189
// Returns SDK version for using in statistics headers
190190
public func getSdkVersion() -> String {
191-
return "23.8";
191+
return "23.9";
192192
}
193193
}

Sources/AsposeWordsCloud/Api/ObjectSerializer.swift

Lines changed: 290 additions & 1 deletion
Large diffs are not rendered by default.

Sources/AsposeWordsCloud/Api/WordsApiError.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public enum WordsApiError : LocalizedError {
3232
case requestError(errorCode: Int, message: String?)
3333
case requiredArgumentError(argumentName: String)
3434
case invalidTypeSerialization(typeName: String)
35+
case invalidTypeDeserialization(typeName: String)
3536
case invalidMultipartResponse(message: String)
3637
case badHostAddress(hostName: String)
3738
case notSupportedMethod(methodName: String)
@@ -44,6 +45,8 @@ public enum WordsApiError : LocalizedError {
4445
return "Required argument \(argumentName) not present.";
4546
case let .invalidTypeSerialization(typeName):
4647
return "Failed to serialize type '\(typeName)'.";
48+
case let .invalidTypeDeserialization(typeName):
49+
return "Failed to deserialize type '\(typeName)'.";
4750
case let .invalidMultipartResponse(message):
4851
return "Failed to parse multipart response: \(message).";
4952
case let .badHostAddress(hostName):

Sources/AsposeWordsCloud/Api/WordsApiModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ import Foundation
3030
// General protocol for all models.
3131
@available(macOS 10.12, iOS 10.3, watchOS 3.3, tvOS 12.0, *)
3232
public protocol WordsApiModel {
33+
init(from json: [String: Any]) throws;
3334
func collectFilesContent(_ resultFilesContent : inout [FileReference]);
3435
}

Sources/AsposeWordsCloud/Model/ApiError.swift

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,20 @@ public class ApiError : Codable, WordsApiModel {
102102
public init() {
103103
}
104104

105+
public required init(from json: [String: Any]) throws {
106+
self.code = json["Code"] as? String;
107+
if let raw_dateTime = json["DateTime"] as? String {
108+
self.dateTime = ObjectSerializer.customIso8601.date(from: raw_dateTime);
109+
}
110+
111+
self.description = json["Description"] as? String;
112+
if let raw_innerError = json["InnerError"] as? [String: Any] {
113+
self.innerError = try ObjectSerializer.deserialize(type: ApiError.self, from: raw_innerError);
114+
}
115+
116+
self.message = json["Message"] as? String;
117+
}
118+
105119
public required init(from decoder: Decoder) throws {
106120
let container = try decoder.container(keyedBy: CodingKeys.self);
107121
self.code = try container.decodeIfPresent(String.self, forKey: .code);

Sources/AsposeWordsCloud/Model/AvailableFontsResponse.swift

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,43 @@ public class AvailableFontsResponse : WordsResponse {
7777
super.init();
7878
}
7979

80+
public required init(from json: [String: Any]) throws {
81+
try super.init(from: json);
82+
if let raw_additionalFonts = json["AdditionalFonts"] as? [Any] {
83+
self.additionalFonts = try raw_additionalFonts.map {
84+
if let element_additionalFonts = $0 as? [String: Any] {
85+
return try ObjectSerializer.deserialize(type: FontInfo.self, from: element_additionalFonts);
86+
}
87+
else {
88+
throw WordsApiError.invalidTypeDeserialization(typeName: "FontInfo");
89+
}
90+
};
91+
}
92+
93+
if let raw_customFonts = json["CustomFonts"] as? [Any] {
94+
self.customFonts = try raw_customFonts.map {
95+
if let element_customFonts = $0 as? [String: Any] {
96+
return try ObjectSerializer.deserialize(type: FontInfo.self, from: element_customFonts);
97+
}
98+
else {
99+
throw WordsApiError.invalidTypeDeserialization(typeName: "FontInfo");
100+
}
101+
};
102+
}
103+
104+
if let raw_systemFonts = json["SystemFonts"] as? [Any] {
105+
self.systemFonts = try raw_systemFonts.map {
106+
if let element_systemFonts = $0 as? [String: Any] {
107+
return try ObjectSerializer.deserialize(type: FontInfo.self, from: element_systemFonts);
108+
}
109+
else {
110+
throw WordsApiError.invalidTypeDeserialization(typeName: "FontInfo");
111+
}
112+
};
113+
}
114+
115+
}
116+
80117
public required init(from decoder: Decoder) throws {
81118
try super.init(from: decoder);
82119
let container = try decoder.container(keyedBy: CodingKeys.self);

Sources/AsposeWordsCloud/Model/BaseEntry.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@ public class BaseEntry : Codable, WordsApiModel {
5050
internal init() {
5151
}
5252

53+
public required init(from json: [String: Any]) throws {
54+
if let raw_fileReference = json["FileReference"] as? [String: Any] {
55+
self.fileReference = try ObjectSerializer.deserialize(type: FileReference.self, from: raw_fileReference);
56+
}
57+
58+
}
59+
5360
public required init(from decoder: Decoder) throws {
5461
let container = try decoder.container(keyedBy: CodingKeys.self);
5562
self.fileReference = try container.decodeIfPresent(FileReference.self, forKey: .fileReference);

0 commit comments

Comments
 (0)