Skip to content

Commit

Permalink
Merge pull request #258 from mathiasemil/master
Browse files Browse the repository at this point in the history
Updates to OpenAPI spec version 3.3
  • Loading branch information
AvdLee authored Feb 23, 2024
2 parents 3489a06 + 97e0ba2 commit 7665555
Show file tree
Hide file tree
Showing 230 changed files with 17,355 additions and 1,854 deletions.
13 changes: 12 additions & 1 deletion Sources/OpenAPI/Generated/Entities/AgeRatingDeclaration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ public struct AgeRatingDeclaration: Codable, Identifiable {
public var profanityOrCrudeHumor: ProfanityOrCrudeHumor?
public var sexualContentGraphicAndNudity: SexualContentGraphicAndNudity?
public var sexualContentOrNudity: SexualContentOrNudity?
/// - warning: Deprecated.
public var isSeventeenPlus: Bool?
public var ageRatingOverride: AgeRatingOverride?
public var horrorOrFearThemes: HorrorOrFearThemes?
public var matureOrSuggestiveThemes: MatureOrSuggestiveThemes?
public var isUnrestrictedWebAccess: Bool?
Expand Down Expand Up @@ -75,6 +77,12 @@ public struct AgeRatingDeclaration: Codable, Identifiable {
case frequentOrIntense = "FREQUENT_OR_INTENSE"
}

public enum AgeRatingOverride: String, Codable, CaseIterable {
case `none` = "NONE"
case seventeenPlus = "SEVENTEEN_PLUS"
case unrated = "UNRATED"
}

public enum HorrorOrFearThemes: String, Codable, CaseIterable {
case `none` = "NONE"
case infrequentOrMild = "INFREQUENT_OR_MILD"
Expand Down Expand Up @@ -105,7 +113,7 @@ public struct AgeRatingDeclaration: Codable, Identifiable {
case frequentOrIntense = "FREQUENT_OR_INTENSE"
}

public init(alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? = nil, contests: Contests? = nil, isGamblingAndContests: Bool? = nil, isGambling: Bool? = nil, gamblingSimulated: GamblingSimulated? = nil, kidsAgeBand: KidsAgeBand? = nil, medicalOrTreatmentInformation: MedicalOrTreatmentInformation? = nil, profanityOrCrudeHumor: ProfanityOrCrudeHumor? = nil, sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? = nil, sexualContentOrNudity: SexualContentOrNudity? = nil, isSeventeenPlus: Bool? = nil, horrorOrFearThemes: HorrorOrFearThemes? = nil, matureOrSuggestiveThemes: MatureOrSuggestiveThemes? = nil, isUnrestrictedWebAccess: Bool? = nil, violenceCartoonOrFantasy: ViolenceCartoonOrFantasy? = nil, violenceRealisticProlongedGraphicOrSadistic: ViolenceRealisticProlongedGraphicOrSadistic? = nil, violenceRealistic: ViolenceRealistic? = nil) {
public init(alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? = nil, contests: Contests? = nil, isGamblingAndContests: Bool? = nil, isGambling: Bool? = nil, gamblingSimulated: GamblingSimulated? = nil, kidsAgeBand: KidsAgeBand? = nil, medicalOrTreatmentInformation: MedicalOrTreatmentInformation? = nil, profanityOrCrudeHumor: ProfanityOrCrudeHumor? = nil, sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? = nil, sexualContentOrNudity: SexualContentOrNudity? = nil, isSeventeenPlus: Bool? = nil, ageRatingOverride: AgeRatingOverride? = nil, horrorOrFearThemes: HorrorOrFearThemes? = nil, matureOrSuggestiveThemes: MatureOrSuggestiveThemes? = nil, isUnrestrictedWebAccess: Bool? = nil, violenceCartoonOrFantasy: ViolenceCartoonOrFantasy? = nil, violenceRealisticProlongedGraphicOrSadistic: ViolenceRealisticProlongedGraphicOrSadistic? = nil, violenceRealistic: ViolenceRealistic? = nil) {
self.alcoholTobaccoOrDrugUseOrReferences = alcoholTobaccoOrDrugUseOrReferences
self.contests = contests
self.isGamblingAndContests = isGamblingAndContests
Expand All @@ -117,6 +125,7 @@ public struct AgeRatingDeclaration: Codable, Identifiable {
self.sexualContentGraphicAndNudity = sexualContentGraphicAndNudity
self.sexualContentOrNudity = sexualContentOrNudity
self.isSeventeenPlus = isSeventeenPlus
self.ageRatingOverride = ageRatingOverride
self.horrorOrFearThemes = horrorOrFearThemes
self.matureOrSuggestiveThemes = matureOrSuggestiveThemes
self.isUnrestrictedWebAccess = isUnrestrictedWebAccess
Expand All @@ -138,6 +147,7 @@ public struct AgeRatingDeclaration: Codable, Identifiable {
self.sexualContentGraphicAndNudity = try values.decodeIfPresent(SexualContentGraphicAndNudity.self, forKey: "sexualContentGraphicAndNudity")
self.sexualContentOrNudity = try values.decodeIfPresent(SexualContentOrNudity.self, forKey: "sexualContentOrNudity")
self.isSeventeenPlus = try values.decodeIfPresent(Bool.self, forKey: "seventeenPlus")
self.ageRatingOverride = try values.decodeIfPresent(AgeRatingOverride.self, forKey: "ageRatingOverride")
self.horrorOrFearThemes = try values.decodeIfPresent(HorrorOrFearThemes.self, forKey: "horrorOrFearThemes")
self.matureOrSuggestiveThemes = try values.decodeIfPresent(MatureOrSuggestiveThemes.self, forKey: "matureOrSuggestiveThemes")
self.isUnrestrictedWebAccess = try values.decodeIfPresent(Bool.self, forKey: "unrestrictedWebAccess")
Expand All @@ -159,6 +169,7 @@ public struct AgeRatingDeclaration: Codable, Identifiable {
try values.encodeIfPresent(sexualContentGraphicAndNudity, forKey: "sexualContentGraphicAndNudity")
try values.encodeIfPresent(sexualContentOrNudity, forKey: "sexualContentOrNudity")
try values.encodeIfPresent(isSeventeenPlus, forKey: "seventeenPlus")
try values.encodeIfPresent(ageRatingOverride, forKey: "ageRatingOverride")
try values.encodeIfPresent(horrorOrFearThemes, forKey: "horrorOrFearThemes")
try values.encodeIfPresent(matureOrSuggestiveThemes, forKey: "matureOrSuggestiveThemes")
try values.encodeIfPresent(isUnrestrictedWebAccess, forKey: "unrestrictedWebAccess")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ public struct AgeRatingDeclarationUpdateRequest: Codable {
public var profanityOrCrudeHumor: ProfanityOrCrudeHumor?
public var sexualContentGraphicAndNudity: SexualContentGraphicAndNudity?
public var sexualContentOrNudity: SexualContentOrNudity?
/// - warning: Deprecated.
public var isSeventeenPlus: Bool?
public var ageRatingOverride: AgeRatingOverride?
public var horrorOrFearThemes: HorrorOrFearThemes?
public var matureOrSuggestiveThemes: MatureOrSuggestiveThemes?
public var isUnrestrictedWebAccess: Bool?
Expand Down Expand Up @@ -77,6 +79,12 @@ public struct AgeRatingDeclarationUpdateRequest: Codable {
case frequentOrIntense = "FREQUENT_OR_INTENSE"
}

public enum AgeRatingOverride: String, Codable, CaseIterable {
case `none` = "NONE"
case seventeenPlus = "SEVENTEEN_PLUS"
case unrated = "UNRATED"
}

public enum HorrorOrFearThemes: String, Codable, CaseIterable {
case `none` = "NONE"
case infrequentOrMild = "INFREQUENT_OR_MILD"
Expand Down Expand Up @@ -107,7 +115,7 @@ public struct AgeRatingDeclarationUpdateRequest: Codable {
case frequentOrIntense = "FREQUENT_OR_INTENSE"
}

public init(alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? = nil, contests: Contests? = nil, isGamblingAndContests: Bool? = nil, isGambling: Bool? = nil, gamblingSimulated: GamblingSimulated? = nil, kidsAgeBand: KidsAgeBand? = nil, medicalOrTreatmentInformation: MedicalOrTreatmentInformation? = nil, profanityOrCrudeHumor: ProfanityOrCrudeHumor? = nil, sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? = nil, sexualContentOrNudity: SexualContentOrNudity? = nil, isSeventeenPlus: Bool? = nil, horrorOrFearThemes: HorrorOrFearThemes? = nil, matureOrSuggestiveThemes: MatureOrSuggestiveThemes? = nil, isUnrestrictedWebAccess: Bool? = nil, violenceCartoonOrFantasy: ViolenceCartoonOrFantasy? = nil, violenceRealisticProlongedGraphicOrSadistic: ViolenceRealisticProlongedGraphicOrSadistic? = nil, violenceRealistic: ViolenceRealistic? = nil) {
public init(alcoholTobaccoOrDrugUseOrReferences: AlcoholTobaccoOrDrugUseOrReferences? = nil, contests: Contests? = nil, isGamblingAndContests: Bool? = nil, isGambling: Bool? = nil, gamblingSimulated: GamblingSimulated? = nil, kidsAgeBand: KidsAgeBand? = nil, medicalOrTreatmentInformation: MedicalOrTreatmentInformation? = nil, profanityOrCrudeHumor: ProfanityOrCrudeHumor? = nil, sexualContentGraphicAndNudity: SexualContentGraphicAndNudity? = nil, sexualContentOrNudity: SexualContentOrNudity? = nil, isSeventeenPlus: Bool? = nil, ageRatingOverride: AgeRatingOverride? = nil, horrorOrFearThemes: HorrorOrFearThemes? = nil, matureOrSuggestiveThemes: MatureOrSuggestiveThemes? = nil, isUnrestrictedWebAccess: Bool? = nil, violenceCartoonOrFantasy: ViolenceCartoonOrFantasy? = nil, violenceRealisticProlongedGraphicOrSadistic: ViolenceRealisticProlongedGraphicOrSadistic? = nil, violenceRealistic: ViolenceRealistic? = nil) {
self.alcoholTobaccoOrDrugUseOrReferences = alcoholTobaccoOrDrugUseOrReferences
self.contests = contests
self.isGamblingAndContests = isGamblingAndContests
Expand All @@ -119,6 +127,7 @@ public struct AgeRatingDeclarationUpdateRequest: Codable {
self.sexualContentGraphicAndNudity = sexualContentGraphicAndNudity
self.sexualContentOrNudity = sexualContentOrNudity
self.isSeventeenPlus = isSeventeenPlus
self.ageRatingOverride = ageRatingOverride
self.horrorOrFearThemes = horrorOrFearThemes
self.matureOrSuggestiveThemes = matureOrSuggestiveThemes
self.isUnrestrictedWebAccess = isUnrestrictedWebAccess
Expand All @@ -140,6 +149,7 @@ public struct AgeRatingDeclarationUpdateRequest: Codable {
self.sexualContentGraphicAndNudity = try values.decodeIfPresent(SexualContentGraphicAndNudity.self, forKey: "sexualContentGraphicAndNudity")
self.sexualContentOrNudity = try values.decodeIfPresent(SexualContentOrNudity.self, forKey: "sexualContentOrNudity")
self.isSeventeenPlus = try values.decodeIfPresent(Bool.self, forKey: "seventeenPlus")
self.ageRatingOverride = try values.decodeIfPresent(AgeRatingOverride.self, forKey: "ageRatingOverride")
self.horrorOrFearThemes = try values.decodeIfPresent(HorrorOrFearThemes.self, forKey: "horrorOrFearThemes")
self.matureOrSuggestiveThemes = try values.decodeIfPresent(MatureOrSuggestiveThemes.self, forKey: "matureOrSuggestiveThemes")
self.isUnrestrictedWebAccess = try values.decodeIfPresent(Bool.self, forKey: "unrestrictedWebAccess")
Expand All @@ -161,6 +171,7 @@ public struct AgeRatingDeclarationUpdateRequest: Codable {
try values.encodeIfPresent(sexualContentGraphicAndNudity, forKey: "sexualContentGraphicAndNudity")
try values.encodeIfPresent(sexualContentOrNudity, forKey: "sexualContentOrNudity")
try values.encodeIfPresent(isSeventeenPlus, forKey: "seventeenPlus")
try values.encodeIfPresent(ageRatingOverride, forKey: "ageRatingOverride")
try values.encodeIfPresent(horrorOrFearThemes, forKey: "horrorOrFearThemes")
try values.encodeIfPresent(matureOrSuggestiveThemes, forKey: "matureOrSuggestiveThemes")
try values.encodeIfPresent(isUnrestrictedWebAccess, forKey: "unrestrictedWebAccess")
Expand Down
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")
}
}
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")
}
}
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")
}
}
Loading

0 comments on commit 7665555

Please sign in to comment.