Closed liamnichols closed 1 year ago
Warnings | |
---|---|
:warning: | Consider to place some `MARK:` lines for Sources/OpenAPI/Generated/Paths/PathsV1AppStoreVersionsWithIDCustomerReviews.swift, which is over 300 lines big. |
:warning: | Consider to place some `MARK:` lines for Sources/OpenAPI/Generated/Paths/PathsV1CiBuildRunsWithIDBuilds.swift, which is over 300 lines big. |
:warning: | Consider to place some `MARK:` lines for Sources/OpenAPI/Generated/Paths/PathsV1Builds.swift, which is over 300 lines big. |
:warning: | Consider to place some `MARK:` lines for Sources/OpenAPI/Generated/Paths/PathsV1AppsWithIDCustomerReviews.swift, which is over 300 lines big. |
:warning: | Consider to place some `MARK:` lines for Sources/OpenAPI/Generated/Paths/PathsV1Apps.swift, which is over 300 lines big. |
:warning: | Consider to place some `MARK:` lines for Sources/OpenAPI/Generated/Paths/PathsV1CiProductsWithIDApp.swift, which is over 300 lines big. |
:warning: | Consider to place some `MARK:` lines for Sources/OpenAPI/Generated/Paths/PathsV1AppsWithID.swift, which is over 300 lines big. |
:warning: | Consider to place some `MARK:` lines for Sources/OpenAPI/Generated/Paths/PathsV1AppsWithIDAppStoreVersions.swift, which is over 300 lines big. |
:warning: | 'AppStoreVersionSubmission' is deprecated: Deprecated |
:warning: | 'AppStoreVersionSubmission' is deprecated: Deprecated |
:warning: | 'AppStoreVersionSubmission' is deprecated: Deprecated |
:warning: | 'AppStoreVersionSubmission' is deprecated: Deprecated |
:warning: | 'AgeRatingDeclaration' is deprecated: Deprecated |
:warning: | 'AgeRatingDeclaration' is deprecated: Deprecated |
:warning: | 'AgeRatingDeclaration' is deprecated: Deprecated |
:warning: | 'AppPricePoint' is deprecated: Deprecated |
:warning: | 'AppPricePoint' is deprecated: Deprecated |
:warning: | 'AppPricePoint' is deprecated: Deprecated |
:warning: | 'AppPricePoint' is deprecated: Deprecated |
:warning: | 'AppPricePoint' is deprecated: Deprecated |
:warning: | 'AppPricePoint' is deprecated: Deprecated |
:warning: | 'PricePoints' is deprecated: Deprecated |
:warning: | 'PricePoints' is deprecated: Deprecated |
:warning: | 'PricePoints' is deprecated: Deprecated |
:warning: | 'InAppPurchases' is deprecated: Deprecated |
:warning: | 'InAppPurchases' is deprecated: Deprecated |
:warning: | 'InAppPurchases' is deprecated: Deprecated |
Messages | |
---|---|
:book: | View more details on Bitrise |
:book: | AppStoreConnect-Swift-SDK-Tests: Executed 9 tests (0 failed, 0 retried, 0 skipped) in 0.033 seconds |
Name | Coverage |
---|
Generated by :no_entry_sign: Danger Swift against 4e088d289dd06c07215cc2f3a2e2f680b6d4a4fe
Just to be sure, does this introduce any breaking changes? Since you've removed the REST methods in the Endpoints struct? Note that we're not using Get in this SDK as a dependency
Ah hmm, there are no breaking changes if usage of Request
is considered internal, but I didn't pay close attention and looking back at the diff, those methods on Request
are public.. So technically, yes there are.
Do you consider the methods, initialiser and properties of Request
as public in your API surface or were they just public to make the generator happy?
If we want to, I can revert those changes and add a new initialiser that matches the Get 1.0 initialiser which is required by CreateAPI 0.1 without breaking the public interface I think.
It would mean that your Request
would differ a bit from Get's, but it would work š
@liamnichols sorry for not replying earlier, I was on a holiday!
What's leading here is whether the example project still works. If so, your PR is good to be merged!
@liamnichols any updates?
I was on a holiday!
Me too š
It was working, but I just rebased from master
and the latest schema update throws an error when testing the generator:
Error: Failed to generate get for Operation(tags: Optional(["SubscriptionOfferCodeOneTimeUseCodes"]), summary: nil, description: nil, externalDocs: nil, operationId: Optional("subscriptionOfferCodeOneTimeUseCodes-get_instance"), parameters: [Either(Parameter(name: "fields[subscriptionOfferCodeOneTimeUseCodes]", context: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Parameter.Context.query(required: false, allowEmptyValue: false), description: Optional("the fields to include for returned resources of type subscriptionOfferCodeOneTimeUseCodes"), deprecated: false, schemaOrContent: Either(SchemaContext(style: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Parameter.SchemaContext.Style.form, explode: false, allowReserved: false, schema: Either(JSONSchema(warnings: [], value: OpenAPIKit30.JSONSchema.Schema.array(OpenAPIKit30.JSONSchema.CoreContext<OpenAPIKit30.JSONTypeFormat.ArrayFormat>(format: OpenAPIKit30.JSONTypeFormat.ArrayFormat.generic, required: true, _nullable: nil, _permissions: nil, _deprecated: nil, title: nil, description: nil, externalDocs: nil, discriminator: nil, allowedValues: nil, defaultValue: nil, example: nil), OpenAPIKit30.JSONSchema.ArrayContext(items: Optional(OpenAPIKit30.JSONSchema(warnings: [], value: OpenAPIKit30.JSONSchema.Schema.string(OpenAPIKit30.JSONSchema.CoreContext<OpenAPIKit30.JSONTypeFormat.StringFormat>(format: OpenAPIKit30.JSONTypeFormat.StringFormat.generic, required: true, _nullable: nil, _permissions: nil, _deprecated: nil, title: nil, description: nil, externalDocs: nil, discriminator: nil, allowedValues: Optional([AnyCodable("active"), AnyCodable("createdDate"), AnyCodable("expirationDate"), AnyCodable("numberOfCodes"), AnyCodable("offerCode"), AnyCodable("values")]), defaultValue: nil, example: nil), OpenAPIKit30.JSONSchema.StringContext(maxLength: nil, _minLength: nil, pattern: nil)))), maxItems: nil, _minItems: nil, _uniqueItems: nil)))), example: nil, examples: nil)), vendorExtensions: [:])), Either(Parameter(name: "include", context: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Parameter.Context.query(required: false, allowEmptyValue: false), description: Optional("comma-separated list of relationships to include"), deprecated: false, schemaOrContent: Either(SchemaContext(style: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Parameter.SchemaContext.Style.form, explode: false, allowReserved: false, schema: Either(JSONSchema(warnings: [], value: OpenAPIKit30.JSONSchema.Schema.array(OpenAPIKit30.JSONSchema.CoreContext<OpenAPIKit30.JSONTypeFormat.ArrayFormat>(format: OpenAPIKit30.JSONTypeFormat.ArrayFormat.generic, required: true, _nullable: nil, _permissions: nil, _deprecated: nil, title: nil, description: nil, externalDocs: nil, discriminator: nil, allowedValues: nil, defaultValue: nil, example: nil), OpenAPIKit30.JSONSchema.ArrayContext(items: Optional(OpenAPIKit30.JSONSchema(warnings: [], value: OpenAPIKit30.JSONSchema.Schema.string(OpenAPIKit30.JSONSchema.CoreContext<OpenAPIKit30.JSONTypeFormat.StringFormat>(format: OpenAPIKit30.JSONTypeFormat.StringFormat.generic, required: true, _nullable: nil, _permissions: nil, _deprecated: nil, title: nil, description: nil, externalDocs: nil, discriminator: nil, allowedValues: Optional([AnyCodable("offerCode")]), defaultValue: nil, example: nil), OpenAPIKit30.JSONSchema.StringContext(maxLength: nil, _minLength: nil, pattern: nil)))), maxItems: nil, _minItems: nil, _uniqueItems: nil)))), example: nil, examples: nil)), vendorExtensions: [:])), Either(Parameter(name: "fields[subscriptionOfferCodeOneTimeUseCodeValues]", context: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Parameter.Context.query(required: false, allowEmptyValue: false), description: Optional("the fields to include for returned resources of type subscriptionOfferCodeOneTimeUseCodeValues"), deprecated: false, schemaOrContent: Either(SchemaContext(style: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Parameter.SchemaContext.Style.form, explode: false, allowReserved: false, schema: Either(JSONSchema(warnings: [], value: OpenAPIKit30.JSONSchema.Schema.array(OpenAPIKit30.JSONSchema.CoreContext<OpenAPIKit30.JSONTypeFormat.ArrayFormat>(format: OpenAPIKit30.JSONTypeFormat.ArrayFormat.generic, required: true, _nullable: nil, _permissions: nil, _deprecated: nil, title: nil, description: nil, externalDocs: nil, discriminator: nil, allowedValues: nil, defaultValue: nil, example: nil), OpenAPIKit30.JSONSchema.ArrayContext(items: Optional(OpenAPIKit30.JSONSchema(warnings: [], value: OpenAPIKit30.JSONSchema.Schema.string(OpenAPIKit30.JSONSchema.CoreContext<OpenAPIKit30.JSONTypeFormat.StringFormat>(format: OpenAPIKit30.JSONTypeFormat.StringFormat.generic, required: true, _nullable: nil, _permissions: nil, _deprecated: nil, title: nil, description: nil, externalDocs: nil, discriminator: nil, allowedValues: Optional([]), defaultValue: nil, example: nil), OpenAPIKit30.JSONSchema.StringContext(maxLength: nil, _minLength: nil, pattern: nil)))), maxItems: nil, _minItems: nil, _uniqueItems: nil)))), example: nil, examples: nil)), vendorExtensions: [:]))], requestBody: nil, responses: OpenAPIKitCore.OrderedDictionary<(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode, OpenAPIKitCore.Either<OpenAPIKit30.JSONReference<(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response>, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response>>(orderedKeys: [(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode(warnings: [], value: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode.Code.status(code: 400)), (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode(warnings: [], value: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode.Code.status(code: 403)), (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode(warnings: [], value: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode.Code.status(code: 404)), (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode(warnings: [], value: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode.Code.status(code: 200))], unorderedHash: [(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode(warnings: [], value: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode.Code.status(code: 404)): Either(Response(description: "Not found error", headers: nil, content: OpenAPIKitCore.OrderedDictionary<OpenAPIKitCore.OpenAPI.ContentType, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Content>(orderedKeys: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.json, warnings: [], parameters: [:])], unorderedHash: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.json, warnings: [], parameters: [:]): (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Content(schema: Optional(Either(internal(#/components/schemas/ErrorResponse))), example: nil, examples: nil, encoding: nil, vendorExtensions: [:])], _warnings: []), links: OpenAPIKitCore.OrderedDictionary<Swift.String, OpenAPIKitCore.Either<OpenAPIKit30.JSONReference<(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Link>, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Link>>(orderedKeys: [], unorderedHash: [:], _warnings: []), vendorExtensions: [:])), (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode(warnings: [], value: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode.Code.status(code: 400)): Either(Response(description: "Parameter error(s)", headers: nil, content: OpenAPIKitCore.OrderedDictionary<OpenAPIKitCore.OpenAPI.ContentType, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Content>(orderedKeys: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.json, warnings: [], parameters: [:])], unorderedHash: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.json, warnings: [], parameters: [:]): (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Content(schema: Optional(Either(internal(#/components/schemas/ErrorResponse))), example: nil, examples: nil, encoding: nil, vendorExtensions: [:])], _warnings: []), links: OpenAPIKitCore.OrderedDictionary<Swift.String, OpenAPIKitCore.Either<OpenAPIKit30.JSONReference<(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Link>, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Link>>(orderedKeys: [], unorderedHash: [:], _warnings: []), vendorExtensions: [:])), (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode(warnings: [], value: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode.Code.status(code: 200)): Either(Response(description: "Single SubscriptionOfferCodeOneTimeUseCode", headers: nil, content: OpenAPIKitCore.OrderedDictionary<OpenAPIKitCore.OpenAPI.ContentType, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Content>(orderedKeys: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.json, warnings: [], parameters: [:])], unorderedHash: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.json, warnings: [], parameters: [:]): (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Content(schema: Optional(Either(internal(#/components/schemas/SubscriptionOfferCodeOneTimeUseCodeResponse))), example: nil, examples: nil, encoding: nil, vendorExtensions: [:])], _warnings: []), links: OpenAPIKitCore.OrderedDictionary<Swift.String, OpenAPIKitCore.Either<OpenAPIKit30.JSONReference<(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Link>, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Link>>(orderedKeys: [], unorderedHash: [:], _warnings: []), vendorExtensions: [:])), (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode(warnings: [], value: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Response.StatusCode.Code.status(code: 403)): Either(Response(description: "Forbidden error", headers: nil, content: OpenAPIKitCore.OrderedDictionary<OpenAPIKitCore.OpenAPI.ContentType, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Content>(orderedKeys: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.json, warnings: [], parameters: [:])], unorderedHash: [OpenAPIKitCore.OpenAPI.ContentType(underlyingType: OpenAPIKitCore.OpenAPI.ContentType.Builtin.json, warnings: [], parameters: [:]): (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Content(schema: Optional(Either(internal(#/components/schemas/ErrorResponse))), example: nil, examples: nil, encoding: nil, vendorExtensions: [:])], _warnings: []), links: OpenAPIKitCore.OrderedDictionary<Swift.String, OpenAPIKitCore.Either<OpenAPIKit30.JSONReference<(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Link>, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Link>>(orderedKeys: [], unorderedHash: [:], _warnings: []), vendorExtensions: [:]))], _warnings: []), callbacks: OpenAPIKitCore.OrderedDictionary<Swift.String, OpenAPIKitCore.Either<OpenAPIKit30.JSONReference<OpenAPIKitCore.OrderedDictionary<(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.CallbackURL, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.PathItem>>, OpenAPIKitCore.OrderedDictionary<(extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.CallbackURL, (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.PathItem>>>(orderedKeys: [], unorderedHash: [:], _warnings: []), deprecated: false, security: nil, servers: nil, vendorExtensions: [:]). Failed to generate query parameter Parameter(name: "fields[subscriptionOfferCodeOneTimeUseCodeValues]", context: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Parameter.Context.query(required: false, allowEmptyValue: false), description: Optional("the fields to include for returned resources of type subscriptionOfferCodeOneTimeUseCodeValues"), deprecated: false, schemaOrContent: Either(SchemaContext(style: (extension in OpenAPIKit30):OpenAPIKitCore.OpenAPI.Parameter.SchemaContext.Style.form, explode: false, allowReserved: false, schema: Either(JSONSchema(warnings: [], value: OpenAPIKit30.JSONSchema.Schema.array(OpenAPIKit30.JSONSchema.CoreContext<OpenAPIKit30.JSONTypeFormat.ArrayFormat>(format: OpenAPIKit30.JSONTypeFormat.ArrayFormat.generic, required: true, _nullable: nil, _permissions: nil, _deprecated: nil, title: nil, description: nil, externalDocs: nil, discriminator: nil, allowedValues: nil, defaultValue: nil, example: nil), OpenAPIKit30.JSONSchema.ArrayContext(items: Optional(OpenAPIKit30.JSONSchema(warnings: [], value: OpenAPIKit30.JSONSchema.Schema.string(OpenAPIKit30.JSONSchema.CoreContext<OpenAPIKit30.JSONTypeFormat.StringFormat>(format: OpenAPIKit30.JSONTypeFormat.StringFormat.generic, required: true, _nullable: nil, _permissions: nil, _deprecated: nil, title: nil, description: nil, externalDocs: nil, discriminator: nil, allowedValues: Optional([]), defaultValue: nil, example: nil), OpenAPIKit30.JSONSchema.StringContext(maxLength: nil, _minLength: nil, pattern: nil)))), maxItems: nil, _minItems: nil, _uniqueItems: nil)))), example: nil, examples: nil)), vendorExtensions: [:]). Enum "FieldsSubscriptionOfferCodeOneTimeUseCodeValues" has no values
Enum "FieldsSubscriptionOfferCodeOneTimeUseCodeValues" has no values
Running swift package --allow-writing-to-package-directory generate-open-api
also fails on master
with the same error so it's not related to the changes in this PR. Do you know what changed? Do I need to remove the enum from FieldsSubscriptionOfferCodeOneTimeUseCodeValues
again?
Hmm, interesting! Could it be related to this: https://github.com/AvdLee/appstoreconnect-swift-sdk/pull/197#issuecomment-1247993297
We've changed the specs using that command and updated the BundleIdPlatform
enum š¤ I just pushed another scheme update for the 2.1 version of ASC API, could you try with the latest master?
Yeah I'm still seeing the same error on master
Enum "FieldsSubscriptionOfferCodeOneTimeUseCodeValues" has no values
(it's buried between some noisy print message that needs cleaning up, but it's there š )
I guess that jq
command in sync_asc_api.yml needs to also delete the enum
type? Is that what you did in the past, or did you add a dummy placeholder value? I can fix it on this branch.
Ok I figured it out, before doing this, I opened AvdLee/appstoreconnect-swift-sdk#208 to clear things up š
Ok I figured it out, before doing this, I opened https://github.com/AvdLee/appstoreconnect-swift-sdk/pull/208 to clear things up š
Ah, glad you figured it out! Would be great if you can optimize the feedback from CreateAPI to give better insights into the reason of failure. Might help you save time in the future!
BTW I'm going to release CreateAPI 0.2.0 later this week which changes the Request
type structure again to work with some API changes that were pushed to Get 2.x š
So I'll update this PR again later after doing that
BTW I'm going to release CreateAPI 0.2.0 later this week which changes the Request type structure again to work with some API changes that were pushed to Get 2.x š So I'll update this PR again later after doing that
Sounds good. Great to hear you're actively developing CreateAPI! Super happy I'm on board š
This PR is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.
(Not stale, Iām just waiting on a couple more bug fixes until we release 0.2 and make further changes to this PR)
This PR is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.
@liamnichols are we ready to update? šŖ
CreateAPI recently released version 0.1 and in this version, we took the decision to make a series of small breaking changes to the way that the tool is used to better shape it's future.
I wanted to submit a PR with this bump since its can be a little tricky unless you have the context of the changes between 0.0.5 and 0.1.0.
To highlight the key changes that impact this project:
--split
is now the default behaviour so I removed the flag--module
is now defined asgenerate
andmodule
in the config fileRequest
type to match that of Get 1.0 and uses the initialiser directly instead of the extensions (this causes a diff in the generated Paths)body
.