-
-
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 #258 from mathiasemil/master
Updates to OpenAPI spec version 3.3
- Loading branch information
Showing
230 changed files
with
17,355 additions
and
1,854 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
56 changes: 56 additions & 0 deletions
56
Sources/OpenAPI/Generated/Entities/AlternativeDistributionKey.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,56 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AlternativeDistributionKey: 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 alternativeDistributionKeys | ||
} | ||
|
||
public struct Attributes: Codable { | ||
public var publicKey: String? | ||
|
||
public init(publicKey: String? = nil) { | ||
self.publicKey = publicKey | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.publicKey = try values.decodeIfPresent(String.self, forKey: "publicKey") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encodeIfPresent(publicKey, forKey: "publicKey") | ||
} | ||
} | ||
|
||
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") | ||
} | ||
} |
132 changes: 132 additions & 0 deletions
132
Sources/OpenAPI/Generated/Entities/AlternativeDistributionKeyCreateRequest.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,132 @@ | ||
// Generated by Create API | ||
// https://github.com/CreateAPI/CreateAPI | ||
|
||
import Foundation | ||
|
||
public struct AlternativeDistributionKeyCreateRequest: Codable { | ||
public var data: Data | ||
|
||
public struct Data: Codable { | ||
public var type: `Type` | ||
public var attributes: Attributes | ||
public var relationships: Relationships | ||
|
||
public enum `Type`: String, Codable, CaseIterable { | ||
case alternativeDistributionKeys | ||
} | ||
|
||
public struct Attributes: Codable { | ||
public var publicKey: String | ||
|
||
public init(publicKey: String) { | ||
self.publicKey = publicKey | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.publicKey = try values.decode(String.self, forKey: "publicKey") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(publicKey, forKey: "publicKey") | ||
} | ||
} | ||
|
||
public struct Relationships: Codable { | ||
public var app: App | ||
|
||
public struct App: Codable { | ||
public var data: Data | ||
|
||
public struct Data: Codable, Identifiable { | ||
public var type: `Type` | ||
public var id: String | ||
|
||
public enum `Type`: String, Codable, CaseIterable { | ||
case apps | ||
} | ||
|
||
public init(type: `Type`, id: String) { | ||
self.type = type | ||
self.id = id | ||
} | ||
|
||
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") | ||
} | ||
|
||
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") | ||
} | ||
} | ||
|
||
public init(data: Data) { | ||
self.data = data | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.data = try values.decode(Data.self, forKey: "data") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(data, forKey: "data") | ||
} | ||
} | ||
|
||
public init(app: App) { | ||
self.app = app | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.app = try values.decode(App.self, forKey: "app") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(app, forKey: "app") | ||
} | ||
} | ||
|
||
public init(type: `Type`, attributes: Attributes, relationships: Relationships) { | ||
self.type = type | ||
self.attributes = attributes | ||
self.relationships = relationships | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.type = try values.decode(`Type`.self, forKey: "type") | ||
self.attributes = try values.decode(Attributes.self, forKey: "attributes") | ||
self.relationships = try values.decode(Relationships.self, forKey: "relationships") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(type, forKey: "type") | ||
try values.encode(attributes, forKey: "attributes") | ||
try values.encode(relationships, forKey: "relationships") | ||
} | ||
} | ||
|
||
public init(data: Data) { | ||
self.data = data | ||
} | ||
|
||
public init(from decoder: Decoder) throws { | ||
let values = try decoder.container(keyedBy: StringCodingKey.self) | ||
self.data = try values.decode(Data.self, forKey: "data") | ||
} | ||
|
||
public func encode(to encoder: Encoder) throws { | ||
var values = encoder.container(keyedBy: StringCodingKey.self) | ||
try values.encode(data, forKey: "data") | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
Sources/OpenAPI/Generated/Entities/AlternativeDistributionKeyResponse.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 AlternativeDistributionKeyResponse: Codable { | ||
/// AlternativeDistributionKey | ||
public var data: AlternativeDistributionKey | ||
public var links: DocumentLinks | ||
|
||
public init(data: AlternativeDistributionKey, 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(AlternativeDistributionKey.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") | ||
} | ||
} |
Oops, something went wrong.