Skip to content

Commit

Permalink
Render without Stencil (#93)
Browse files Browse the repository at this point in the history
* BinarySchemaRenderer without Stencil

* PlainTextSchemaRenderer without Stencil

* PropertyRenderer without Stencil

* OneOfSchemaRenderer without Stencil

* EnumSchemaRenderer without Stencil

* OperationRenderer without Stencil

* Regenerate endpoints

* ObjectSchemaRenderer without Stencil

* Remove Stencil

* Discussion over url

* Regenerate models
  • Loading branch information
MortenGregersen authored Jul 29, 2022
1 parent de8fb85 commit b5d7879
Show file tree
Hide file tree
Showing 1,074 changed files with 13,613 additions and 7,964 deletions.
139 changes: 2 additions & 137 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,96 +1,6 @@
{
"object": {
"pins": [
{
"package": "Komondor",
"repositoryURL": "https://github.com/shibapm/Komondor.git",
"state": {
"branch": null,
"revision": "dedffeaf42a1b52bf072a9dc47afb35000a8b265",
"version": "1.1.4"
}
},
{
"package": "Logger",
"repositoryURL": "https://github.com/shibapm/Logger",
"state": {
"branch": null,
"revision": "53c3ecca5abe8cf46697e33901ee774236d94cce",
"version": "0.2.3"
}
},
{
"package": "PackageConfig",
"repositoryURL": "https://github.com/shibapm/PackageConfig.git",
"state": {
"branch": null,
"revision": "58523193c26fb821ed1720dcd8a21009055c7cdb",
"version": "1.1.3"
}
},
{
"package": "PathKit",
"repositoryURL": "https://github.com/kylef/PathKit.git",
"state": {
"branch": null,
"revision": "3bfd2737b700b9a36565a8c94f4ad2b050a5e574",
"version": "1.0.1"
}
},
{
"package": "Rocket",
"repositoryURL": "https://github.com/f-meloni/Rocket",
"state": {
"branch": null,
"revision": "9880a5beb7fcb9e61ddd5764edc1700b8c418deb",
"version": "1.2.1"
}
},
{
"package": "ShellOut",
"repositoryURL": "https://github.com/JohnSundell/ShellOut.git",
"state": {
"branch": null,
"revision": "e1577acf2b6e90086d01a6d5e2b8efdaae033568",
"version": "2.3.0"
}
},
{
"package": "SourceKitten",
"repositoryURL": "https://github.com/jpsim/SourceKitten.git",
"state": {
"branch": null,
"revision": "817dfa6f2e09b0476f3a6c9dbc035991f02f0241",
"version": "0.32.0"
}
},
{
"package": "Spectre",
"repositoryURL": "https://github.com/kylef/Spectre.git",
"state": {
"branch": null,
"revision": "26cc5e9ae0947092c7139ef7ba612e34646086c7",
"version": "0.10.1"
}
},
{
"package": "Stencil",
"repositoryURL": "https://github.com/stencilproject/Stencil.git",
"state": {
"branch": null,
"revision": "ccd9402682f4c07dac9561befd207c8156e80e20",
"version": "0.14.2"
}
},
{
"package": "StencilSwiftKit",
"repositoryURL": "https://github.com/SwiftGen/StencilSwiftKit",
"state": {
"branch": null,
"revision": "54cbedcdbb4334e03930adcff7343ffaf317bf0f",
"version": "2.8.0"
}
},
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser",
Expand All @@ -114,53 +24,8 @@
"repositoryURL": "https://github.com/nicklockwood/SwiftFormat",
"state": {
"branch": null,
"revision": "378543f07b6acf6e13982ffed8bd71d4b0041f61",
"version": "0.49.11"
}
},
{
"package": "SwiftLint",
"repositoryURL": "https://github.com/Realm/SwiftLint.git",
"state": {
"branch": null,
"revision": "e8ef21fef61f12536964c4e3cf6d5a6e3ad81e49",
"version": "0.46.5"
}
},
{
"package": "SwiftShell",
"repositoryURL": "https://github.com/kareman/SwiftShell",
"state": {
"branch": null,
"revision": "a6014fe94c3dbff0ad500e8da4f251a5d336530b",
"version": "5.1.0-beta.1"
}
},
{
"package": "SwiftyTextTable",
"repositoryURL": "https://github.com/scottrhoyt/SwiftyTextTable.git",
"state": {
"branch": null,
"revision": "c6df6cf533d120716bff38f8ff9885e1ce2a4ac3",
"version": "0.9.0"
}
},
{
"package": "SWXMLHash",
"repositoryURL": "https://github.com/drmohundro/SWXMLHash.git",
"state": {
"branch": null,
"revision": "6469881a3f30417c5bb02404ea4b69207f297592",
"version": "6.0.0"
}
},
{
"package": "Yams",
"repositoryURL": "https://github.com/jpsim/Yams",
"state": {
"branch": null,
"revision": "9ff1cc9327586db4e0c8f46f064b6a82ec1566fa",
"version": "4.0.6"
"revision": "665c3c58923ee8ac36d3e44b17dc185229cce301",
"version": "0.49.13"
}
},
{
Expand Down
2 changes: 0 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.1.0"),
.package(url: "https://github.com/SwiftGen/StencilSwiftKit", from: "2.8.0"),
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.48.17"),
.package(url: "https://github.com/apple/swift-crypto", from: "2.0.0"),
.package(url: "https://github.com/marmelroy/Zip.git", from: "2.1.2"),
Expand Down Expand Up @@ -48,7 +47,6 @@ let package = Package(
"BagbutikDocsCollector",
"BagbutikSpecDecoder",
"BagbutikStringExtensions",
"StencilSwiftKit",
"SwiftFormat"
]),
.target(name: "BagbutikDocsCollector", dependencies: ["BagbutikSpecDecoder"]),
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
</p>

<p align="center">
<b>Generated Swift code for the <a href="https://developer.apple.com/documentation/appstoreconnectapi">App Store Connect API</a> based on the official <a href="https://en.wikipedia.org/wiki/OpenAPI_Specification">OpenAPI spec</a>.</b><br />
Created with <a href="https://github.com/SwiftGen/StencilSwiftKit">StencilSwiftKit</a> and <a href="https://github.com/apple/swift-crypto">swift-crypto</a><br />
<b>Generated Swift code for the <a href="https://developer.apple.com/documentation/appstoreconnectapi">App Store Connect API</a> based on the official <a href="https://en.wikipedia.org/wiki/OpenAPI_Specification">OpenAPI spec</a>.</b>
<br />
<a href="https://swiftpackageindex.com/MortenGregersen/Bagbutik">
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FMortenGregersen%2FBagbutik%2Fbadge%3Ftype%3Dswift-versions" alt="Swift versions" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
public extension Request {
/**
# Modify an Age Rating Declaration
Provide age-related information so the App Store can determine the age rating for your app.
# Modify an Age Rating Declaration
Provide age-related information so the App Store can determine the age rating for your app.

Every app store version has an age rating declaration. Use this endpoint to edit the declaration and provide app-characteristic information so App Store Connect can determine the appropriate age rating for the app.
Use this endpoint to indicate whether an app is Made for Kids.
When calling this endpoint, only include the attributes that you’re modifying.
For example, in an app that has a `FREQUENT_OR_INTENSE` declaration for contests, the age rating for the `AppInfos` is 12+. If you declare a value of true for `gamblingAndContests` instead, the age rating for the `AppInfos` is 17+.
Every app store version has an age rating declaration. Use this endpoint to edit the declaration and provide app-characteristic information so App Store Connect can determine the appropriate age rating for the app.
Use this endpoint to indicate whether an app is Made for Kids.
When calling this endpoint, only include the attributes that you’re modifying.
For example, in an app that has a `FREQUENT_OR_INTENSE` declaration for contests, the age rating for the `AppInfos` is 12+. If you declare a value of true for `gamblingAndContests` instead, the age rating for the `AppInfos` is 17+.

Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/modify_an_age_rating_declaration>
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/modify_an_age_rating_declaration>

- Parameter id: The id of the requested resource
- Parameter requestBody: AgeRatingDeclaration representation
- Returns: A ``Request`` to send to an instance of ``BagbutikService``
- Parameter id: The id of the requested resource
- Parameter requestBody: AgeRatingDeclaration representation
- Returns: A ``Request`` to send to an instance of ``BagbutikService``
*/
static func updateAgeRatingDeclarationV1(id: String,
requestBody: AgeRatingDeclarationUpdateRequest) -> Request<AgeRatingDeclarationResponse, ErrorResponse>
{
return .init(path: "/v1/ageRatingDeclarations/\(id)", method: .patch, requestBody: requestBody)
.init(path: "/v1/ageRatingDeclarations/\(id)", method: .patch, requestBody: requestBody)
}
}
48 changes: 35 additions & 13 deletions Sources/Bagbutik/Endpoints/App/GetAppV1.swift
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
public extension Request {
/**
# Read App Information
Get information about a specific app.
# Read App Information
Get information about a specific app.

Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/read_app_information>
Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/read_app_information>

- Parameter id: The id of the requested resource
- Parameter fields: Fields to return for included related types
- Parameter includes: Relationship data to include in the response
- Parameter limits: Number of resources to return
- Returns: A ``Request`` to send to an instance of ``BagbutikService``
- Parameter id: The id of the requested resource
- Parameter fields: Fields to return for included related types
- Parameter includes: Relationship data to include in the response
- Parameter limits: Number of resources to return
- Returns: A ``Request`` to send to an instance of ``BagbutikService``
*/
static func getAppV1(id: String,
fields: [GetAppV1.Field]? = nil,
includes: [GetAppV1.Include]? = nil,
limits: [GetAppV1.Limit]? = nil) -> Request<AppResponse, ErrorResponse>
{
return .init(path: "/v1/apps/\(id)", method: .get, parameters: .init(fields: fields,
includes: includes,
limits: limits))
.init(path: "/v1/apps/\(id)", method: .get, parameters: .init(fields: fields,
includes: includes,
limits: limits))
}
}

Expand Down Expand Up @@ -382,7 +382,29 @@ public enum GetAppV1 {
Relationship data to include in the response.
*/
public enum Include: String, IncludeParameter {
case appClips, appCustomProductPages, appEvents, appInfos, appStoreVersions, availableTerritories, betaAppLocalizations, betaAppReviewDetail, betaGroups, betaLicenseAgreement, builds, ciProduct, endUserLicenseAgreement, gameCenterEnabledVersions, inAppPurchases, inAppPurchasesV2, preOrder, preReleaseVersions, prices, promotedPurchases, reviewSubmissions, subscriptionGracePeriod, subscriptionGroups
case appClips
case appCustomProductPages
case appEvents
case appInfos
case appStoreVersions
case availableTerritories
case betaAppLocalizations
case betaAppReviewDetail
case betaGroups
case betaLicenseAgreement
case builds
case ciProduct
case endUserLicenseAgreement
case gameCenterEnabledVersions
case inAppPurchases
case inAppPurchasesV2
case preOrder
case preReleaseVersions
case prices
case promotedPurchases
case reviewSubmissions
case subscriptionGracePeriod
case subscriptionGroups
}

/**
Expand Down
66 changes: 44 additions & 22 deletions Sources/Bagbutik/Endpoints/App/ListAppsV1.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
public extension Request {
/**
# List Apps
Find and list apps added in App Store Connect.

Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/list_apps>

- Parameter fields: Fields to return for included related types
- Parameter filters: Attributes, relationships, and IDs by which to filter
- Parameter exists: Attributes, relationships, and IDs to check for existence
- Parameter includes: Relationship data to include in the response
- Parameter sorts: Attributes by which to sort
- Parameter limits: Number of resources to return
- Returns: A ``Request`` to send to an instance of ``BagbutikService``
# List Apps
Find and list apps added in App Store Connect.

Full documentation:
<https://developer.apple.com/documentation/appstoreconnectapi/list_apps>

- Parameter fields: Fields to return for included related types
- Parameter filters: Attributes, relationships, and IDs by which to filter
- Parameter exists: Attributes, relationships, and IDs to check for existence
- Parameter includes: Relationship data to include in the response
- Parameter sorts: Attributes by which to sort
- Parameter limits: Number of resources to return
- Returns: A ``Request`` to send to an instance of ``BagbutikService``
*/
static func listAppsV1(fields: [ListAppsV1.Field]? = nil,
filters: [ListAppsV1.Filter]? = nil,
Expand All @@ -21,12 +21,12 @@ public extension Request {
sorts: [ListAppsV1.Sort]? = nil,
limits: [ListAppsV1.Limit]? = nil) -> Request<AppsResponse, ErrorResponse>
{
return .init(path: "/v1/apps", method: .get, parameters: .init(fields: fields,
filters: filters,
exists: exists,
includes: includes,
sorts: sorts,
limits: limits))
.init(path: "/v1/apps", method: .get, parameters: .init(fields: fields,
filters: filters,
exists: exists,
includes: includes,
sorts: sorts,
limits: limits))
}
}

Expand Down Expand Up @@ -445,7 +445,29 @@ public enum ListAppsV1 {
Relationship data to include in the response.
*/
public enum Include: String, IncludeParameter {
case appClips, appCustomProductPages, appEvents, appInfos, appStoreVersions, availableTerritories, betaAppLocalizations, betaAppReviewDetail, betaGroups, betaLicenseAgreement, builds, ciProduct, endUserLicenseAgreement, gameCenterEnabledVersions, inAppPurchases, inAppPurchasesV2, preOrder, preReleaseVersions, prices, promotedPurchases, reviewSubmissions, subscriptionGracePeriod, subscriptionGroups
case appClips
case appCustomProductPages
case appEvents
case appInfos
case appStoreVersions
case availableTerritories
case betaAppLocalizations
case betaAppReviewDetail
case betaGroups
case betaLicenseAgreement
case builds
case ciProduct
case endUserLicenseAgreement
case gameCenterEnabledVersions
case inAppPurchases
case inAppPurchasesV2
case preOrder
case preReleaseVersions
case prices
case promotedPurchases
case reviewSubmissions
case subscriptionGracePeriod
case subscriptionGroups
}

/**
Expand All @@ -464,8 +486,6 @@ public enum ListAppsV1 {
Number of included related resources to return.
*/
public enum Limit: LimitParameter {
/// Maximum resources per page - maximum 200
case limit(Int)
/// Maximum number of related appClips returned (when they are included) - maximum 50
case appClips(Int)
/// Maximum number of related appCustomProductPages returned (when they are included) - maximum 50
Expand All @@ -490,6 +510,8 @@ public enum ListAppsV1 {
case inAppPurchases(Int)
/// Maximum number of related inAppPurchasesV2 returned (when they are included) - maximum 50
case inAppPurchasesV2(Int)
/// Maximum resources per page - maximum 200
case limit(Int)
/// Maximum number of related preReleaseVersions returned (when they are included) - maximum 50
case preReleaseVersions(Int)
/// Maximum number of related prices returned (when they are included) - maximum 50
Expand Down
Loading

0 comments on commit b5d7879

Please sign in to comment.