-
-
Notifications
You must be signed in to change notification settings - Fork 200
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 #262 from polpielladev/master
Updates OpenAPI spec to `v3.4`
- Loading branch information
Showing
113 changed files
with
3,690 additions
and
280 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AnalyticsReport: Codable, Identifiable { | ||
public var type: `Type` | ||
public var id: String | ||
public var attributes: Attributes? | ||
public var links: ResourceLinks? | ||
|
||
public enum `Type`: String, Codable, CaseIterable { | ||
case analyticsReports | ||
} | ||
|
||
public struct Attributes: Codable { | ||
public var name: String? | ||
public var category: Category? | ||
|
||
public enum Category: String, Codable, CaseIterable { | ||
case appUsage = "APP_USAGE" | ||
case appStoreEngagement = "APP_STORE_ENGAGEMENT" | ||
case commerce = "COMMERCE" | ||
case frameworkUsage = "FRAMEWORK_USAGE" | ||
case performance = "PERFORMANCE" | ||
} | ||
|
||
public init(name: String? = nil, category: Category? = nil) { | ||
self.name = name | ||
self.category = category | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.name = try values.decodeIfPresent(String.self, forKey: "name") | ||
self.category = try values.decodeIfPresent(Category.self, forKey: "category") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encodeIfPresent(name, forKey: "name") | ||
try values.encodeIfPresent(category, forKey: "category") | ||
} | ||
} | ||
|
||
public init(type: `Type`, id: String, attributes: Attributes? = nil, links: ResourceLinks? = nil) { | ||
self.type = type | ||
self.id = id | ||
self.attributes = attributes | ||
self.links = links | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.type = try values.decode(`Type`.self, forKey: "type") | ||
self.id = try values.decode(String.self, forKey: "id") | ||
self.attributes = try values.decodeIfPresent(Attributes.self, forKey: "attributes") | ||
self.links = try values.decodeIfPresent(ResourceLinks.self, forKey: "links") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(type, forKey: "type") | ||
try values.encode(id, forKey: "id") | ||
try values.encodeIfPresent(attributes, forKey: "attributes") | ||
try values.encodeIfPresent(links, forKey: "links") | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
Sources/OpenAPI/Generated/Entities/AnalyticsReportInstance.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,66 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AnalyticsReportInstance: Codable, Identifiable { | ||
public var type: `Type` | ||
public var id: String | ||
public var attributes: Attributes? | ||
public var links: ResourceLinks? | ||
|
||
public enum `Type`: String, Codable, CaseIterable { | ||
case analyticsReportInstances | ||
} | ||
|
||
public struct Attributes: Codable { | ||
public var granularity: Granularity? | ||
public var processingDate: String? | ||
|
||
public enum Granularity: String, Codable, CaseIterable { | ||
case daily = "DAILY" | ||
case weekly = "WEEKLY" | ||
case monthly = "MONTHLY" | ||
} | ||
|
||
public init(granularity: Granularity? = nil, processingDate: String? = nil) { | ||
self.granularity = granularity | ||
self.processingDate = processingDate | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.granularity = try values.decodeIfPresent(Granularity.self, forKey: "granularity") | ||
self.processingDate = try values.decodeIfPresent(String.self, forKey: "processingDate") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encodeIfPresent(granularity, forKey: "granularity") | ||
try values.encodeIfPresent(processingDate, forKey: "processingDate") | ||
} | ||
} | ||
|
||
public init(type: `Type`, id: String, attributes: Attributes? = nil, links: ResourceLinks? = nil) { | ||
self.type = type | ||
self.id = id | ||
self.attributes = attributes | ||
self.links = links | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.type = try values.decode(`Type`.self, forKey: "type") | ||
self.id = try values.decode(String.self, forKey: "id") | ||
self.attributes = try values.decodeIfPresent(Attributes.self, forKey: "attributes") | ||
self.links = try values.decodeIfPresent(ResourceLinks.self, forKey: "links") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(type, forKey: "type") | ||
try values.encode(id, forKey: "id") | ||
try values.encodeIfPresent(attributes, forKey: "attributes") | ||
try values.encodeIfPresent(links, forKey: "links") | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Sources/OpenAPI/Generated/Entities/AnalyticsReportInstanceResponse.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,27 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AnalyticsReportInstanceResponse: Codable { | ||
/// AnalyticsReportInstance | ||
public var data: AnalyticsReportInstance | ||
public var links: DocumentLinks | ||
|
||
public init(data: AnalyticsReportInstance, links: DocumentLinks) { | ||
self.data = data | ||
self.links = links | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.data = try values.decode(AnalyticsReportInstance.self, forKey: "data") | ||
self.links = try values.decode(DocumentLinks.self, forKey: "links") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(data, forKey: "data") | ||
try values.encode(links, forKey: "links") | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
Sources/OpenAPI/Generated/Entities/AnalyticsReportInstancesResponse.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,30 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AnalyticsReportInstancesResponse: Codable { | ||
public var data: [AnalyticsReportInstance] | ||
public var links: PagedDocumentLinks | ||
public var meta: PagingInformation? | ||
|
||
public init(data: [AnalyticsReportInstance], links: PagedDocumentLinks, meta: PagingInformation? = nil) { | ||
self.data = data | ||
self.links = links | ||
self.meta = meta | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.data = try values.decode([AnalyticsReportInstance].self, forKey: "data") | ||
self.links = try values.decode(PagedDocumentLinks.self, forKey: "links") | ||
self.meta = try values.decodeIfPresent(PagingInformation.self, forKey: "meta") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(data, forKey: "data") | ||
try values.encode(links, forKey: "links") | ||
try values.encodeIfPresent(meta, forKey: "meta") | ||
} | ||
} |
Oops, something went wrong.