Skip to content

Commit

Permalink
Reapply docs to schemas (#206)
Browse files Browse the repository at this point in the history
* Use lowercase schema identifiers for docs lookup

* Regenerate
  • Loading branch information
MortenGregersen authored Oct 4, 2024
1 parent 7d1e40e commit ced164b
Show file tree
Hide file tree
Showing 565 changed files with 4,815 additions and 9 deletions.
10 changes: 10 additions & 0 deletions Sources/Bagbutik-Core/Models/DocumentLinks.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import Foundation

/**
# DocumentLinks
Self-links to documents that can contain information for one or more resources.
All the response data constitutes a *document*.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/documentlinks>
*/
public struct DocumentLinks: Codable, Sendable {
/// The link that produced the current document.
public let itself: String

public init(self itself: String) {
Expand Down
8 changes: 8 additions & 0 deletions Sources/Bagbutik-Core/Models/ErrorResponse.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import Foundation

/**
# ErrorResponse
The error details that an API returns in the response body whenever the API request isn’t successful.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/errorresponse>
*/
public struct ErrorResponse: Codable, Sendable, Error {
/// An array of one or more errors.
public var errors: [Errors]?

public init(errors: [Errors]? = nil) {
Expand Down
10 changes: 10 additions & 0 deletions Sources/Bagbutik-Core/Models/JsonPointer.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import Foundation

/**
# JsonPointer
An object that contains the JSON pointer that indicates the location of the error.
In some cases, the JSON pointer may indicate an element that isn’t in the request entity, but should be. For more information about JSON pointers, see the [RFC 6901](https://developer.apple.comhttps://tools.ietf.org/html/rfc6901) proposed standards document.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/jsonpointer>
*/
public struct JsonPointer: Codable, Sendable {
/// A JSON pointer that indicates the location in the request entity where the error originates.
public let pointer: String

public init(pointer: String) {
Expand Down
12 changes: 12 additions & 0 deletions Sources/Bagbutik-Core/Models/PagedDocumentLinks.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
import Foundation

/**
# PagedDocumentLinks
Links related to the response document, including paging links.
All the response data constitutes multiple *documents.*
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/pageddocumentlinks>
*/
public struct PagedDocumentLinks: Codable, Sendable {
/// The link to the first page of documents.
public var first: String?
/// The link to the next page of documents.
public var next: String?
/// The link that produced the current document.
public let itself: String

public init(first: String? = nil,
Expand Down
8 changes: 8 additions & 0 deletions Sources/Bagbutik-Core/Models/PagingInformation.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import Foundation

/**
# PagingInformation
Paging information for data responses.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/paginginformation>
*/
public struct PagingInformation: Codable, Sendable {
/// The paging information details.
public let paging: Paging

public init(paging: Paging) {
Expand Down
8 changes: 8 additions & 0 deletions Sources/Bagbutik-Core/Models/Parameter.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import Foundation

/**
# Parameter
An object that contains the query parameter that produced the error.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/parameter>
*/
public struct Parameter: Codable, Sendable {
/// The query parameter that produced the error.
public let parameter: String

public init(parameter: String) {
Expand Down
9 changes: 9 additions & 0 deletions Sources/Bagbutik-Core/Models/RelationshipLinks.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
import Foundation

/**
# RelationshipLinks
Links related to the response document, including self links.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/relationshiplinks>
*/
public struct RelationshipLinks: Codable, Sendable {
/// The link to the related documents.
public var related: String?
/// The link that produced the current document.
public var itself: String?

public init(related: String? = nil,
Expand Down
8 changes: 8 additions & 0 deletions Sources/Bagbutik-Core/Models/ResourceLinks.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import Foundation

/**
# ResourceLinks
Self-links to requested resources.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/resourcelinks>
*/
public struct ResourceLinks: Codable, Sendable {
/// The link to the resource.
public var itself: String?

public init(self itself: String? = nil) {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Bagbutik-Models/AppStore/AgeRatingDeclaration.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
import Bagbutik_Core
import Foundation

/**
# AgeRatingDeclaration
The data structure that represents an Age Rating Declarations resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/ageratingdeclaration>
*/
public struct AgeRatingDeclaration: Codable, Sendable, Identifiable {
/// The opaque resource ID that uniquely identifies the resource.
public let id: String
/// Navigational links that include the self-link.
public var links: ResourceLinks?
/// The resource type.
public var type: String { "ageRatingDeclarations" }
/// Attributes that describe this Age Rating Declarations resource.
public var attributes: Attributes?

public init(id: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import Bagbutik_Core
import Foundation

/**
# AgeRatingDeclarationResponse
A response that contains a single Age Rating Declarations resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/ageratingdeclarationresponse>
*/
public struct AgeRatingDeclarationResponse: Codable, Sendable {
/// The data structure that represents the Age Rating Declarations resource.
public let data: AgeRatingDeclaration
/// Navigational links including the self-link and links to the related data.
public let links: DocumentLinks

public init(data: AgeRatingDeclaration,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import Bagbutik_Core
import Foundation

/**
# AgeRatingDeclarationUpdateRequest
The request body you use to update an Age Rating Declaration.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/ageratingdeclarationupdaterequest>
*/
public struct AgeRatingDeclarationUpdateRequest: Codable, Sendable, RequestBody {
/// The data element of the request body.
public let data: Data

public init(data: Data) {
Expand Down
12 changes: 12 additions & 0 deletions Sources/Bagbutik-Models/AppStore/App.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import Bagbutik_Core
import Foundation

/**
# App
The data structure that represents an Apps resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/app>
*/
public struct App: Codable, Sendable, Identifiable {
/// The opaque resource ID that uniquely identifies the resource.
public let id: String
/// Navigational links that include the self-link.
public var links: ResourceLinks?
/// The resource type.
public var type: String { "apps" }
/// The resource’s attributes.
public var attributes: Attributes?
/// Navigational links to related data and included resource types and IDs.
public var relationships: Relationships?

public init(id: String,
Expand Down
7 changes: 7 additions & 0 deletions Sources/Bagbutik-Models/AppStore/AppAvailabilityV2.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Bagbutik_Core
import Foundation

/**
# AppAvailabilityV2
The data structure that represents an app availability resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appavailabilityv2>
*/
public struct AppAvailabilityV2: Codable, Sendable, Identifiable {
public let id: String
public var links: ResourceLinks?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Bagbutik_Core
import Foundation

/**
# AppAvailabilityV2CreateRequest
The request body you use to create an app availability.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appavailabilityv2createrequest>
*/
public struct AppAvailabilityV2CreateRequest: Codable, Sendable, RequestBody {
public let data: Data
public var included: [TerritoryAvailabilityInlineCreate]?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Bagbutik_Core
import Foundation

/**
# AppAvailabilityV2Response
A response that contains a single app availability resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appavailabilityv2response>
*/
public struct AppAvailabilityV2Response: Codable, Sendable {
public let data: AppAvailabilityV2
public var included: [TerritoryAvailability]?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import Bagbutik_Core
import Foundation

/**
# AppBetaTestersLinkagesRequest
A request body you use to remove beta testers from an app.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appbetatesterslinkagesrequest>
*/
public struct AppBetaTestersLinkagesRequest: Codable, Sendable, RequestBody {
/// The types and IDs of related resources.
public let data: [Data]

public init(data: [Data]) {
Expand Down
7 changes: 7 additions & 0 deletions Sources/Bagbutik-Models/AppStore/AppCategoriesResponse.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Bagbutik_Core
import Foundation

/**
# AppCategoriesResponse
A response that contains a list of App Category resources.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appcategoriesresponse>
*/
public struct AppCategoriesResponse: Codable, Sendable, PagedResponse {
public typealias Data = AppCategory

Expand Down
7 changes: 7 additions & 0 deletions Sources/Bagbutik-Models/AppStore/AppCategory.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Bagbutik_Core
import Foundation

/**
# AppCategory
The data structure that represent an App Categories resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appcategory>
*/
public struct AppCategory: Codable, Sendable, Identifiable {
public let id: String
public var links: ResourceLinks?
Expand Down
7 changes: 7 additions & 0 deletions Sources/Bagbutik-Models/AppStore/AppCategoryResponse.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import Bagbutik_Core
import Foundation

/**
# AppCategoryResponse
A response that contains a single App Categories resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appcategoryresponse>
*/
public struct AppCategoryResponse: Codable, Sendable {
public let data: AppCategory
public var included: [AppCategory]?
Expand Down
12 changes: 12 additions & 0 deletions Sources/Bagbutik-Models/AppStore/AppClip.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import Bagbutik_Core
import Foundation

/**
# AppClip
The data structure that represents an App Clips resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appclip>
*/
public struct AppClip: Codable, Sendable, Identifiable {
/// The opaque resource ID that uniquely identifies an App Clips resource.
public let id: String
/// Navigational links that include the self-link.
public var links: ResourceLinks?
/// The resource type.
public var type: String { "appClips" }
/// The attributes that describe the App Clips resource.
public var attributes: Attributes?
/// The navigational links to related data and included resource types and IDs.
public var relationships: Relationships?

public init(id: String,
Expand Down
12 changes: 12 additions & 0 deletions Sources/Bagbutik-Models/AppStore/AppClipAdvancedExperience.swift
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import Bagbutik_Core
import Foundation

/**
# AppClipAdvancedExperience
The data structure that represents an Advanced App Clip Experiences resource.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appclipadvancedexperience>
*/
public struct AppClipAdvancedExperience: Codable, Sendable, Identifiable {
/// The opaque resource ID that uniquely identifies an Advanced App Clip Experiences resource.
public let id: String
/// Navigational links that include the self-link.
public var links: ResourceLinks?
/// The resource type.
public var type: String { "appClipAdvancedExperiences" }
/// The attributes that describe the Advanced App Clip Experiences resource.
public var attributes: Attributes?
/// The navigational links to related data and included resource types and IDs.
public var relationships: Relationships?

public init(id: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import Bagbutik_Core
import Foundation

/**
# AppClipAdvancedExperienceCreateRequest
The request body you use to create an advanced App Clip experience.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appclipadvancedexperiencecreaterequest>
*/
public struct AppClipAdvancedExperienceCreateRequest: Codable, Sendable, RequestBody {
/// The resource data.
public let data: Data
/// The relationship data to include in the response.
public var included: [AppClipAdvancedExperienceLocalizationInlineCreate]?

public init(data: Data,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
import Bagbutik_Core
import Foundation

/**
# AppClipAdvancedExperienceImage
The data structure that represents an image that appears on the App Clip card for an advanced App Clip experience.
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/appclipadvancedexperienceimage>
*/
public struct AppClipAdvancedExperienceImage: Codable, Sendable, Identifiable {
/// The opaque resource ID that uniquely identifies an Advanced App Clip Experience Images resource.
public let id: String
/// Navigational links that include the self-link.
public var links: ResourceLinks?
/// The resource type.
public var type: String { "appClipAdvancedExperienceImages" }
/// The attributes that describe the Advanced App Clip Experience Images resource.
public var attributes: Attributes?

public init(id: String,
Expand Down
Loading

0 comments on commit ced164b

Please sign in to comment.