Skip to content

Commit 9d21b64

Browse files
authored
Merge pull request #6008 from Shopify/mza/rm-cc-cert-validation
Remove the encryption certificate content validation from the CLI Schema
2 parents 2e92296 + 690bfa9 commit 9d21b64

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

.changeset/fifty-pigs-care.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/cli': patch
3+
---
4+
5+
Fixes the `Encryption certificate fingerprint can't be blank` error when generating a credit card payments extension with the `shopify app generate extension` command.

packages/app/src/cli/models/extensions/specifications/payments_app_extension_schemas/credit_card_payments_app_extension_schema.test.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -89,28 +89,6 @@ describe('CreditCardPaymentsAppExtensionSchema', () => {
8989
)
9090
})
9191

92-
test('returns an error if encryption certificate fingerprint is blank', async () => {
93-
// When/Then
94-
expect(() =>
95-
CreditCardPaymentsAppExtensionSchema.parse({
96-
...config,
97-
encryption_certificate_fingerprint: '',
98-
}),
99-
).toThrowError(
100-
new zod.ZodError([
101-
{
102-
code: zod.ZodIssueCode.too_small,
103-
minimum: 1,
104-
type: 'string',
105-
inclusive: true,
106-
exact: false,
107-
message: "Encryption certificate fingerprint can't be blank",
108-
path: ['encryption_certificate_fingerprint'],
109-
},
110-
]),
111-
)
112-
})
113-
11492
test('returns an error if encryption certificate fingerprint is not present', async () => {
11593
// When/Then
11694
// eslint-disable-next-line @typescript-eslint/naming-convention

packages/app/src/cli/models/extensions/specifications/payments_app_extension_schemas/credit_card_payments_app_extension_schema.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ export const CreditCardPaymentsAppExtensionSchema = BasePaymentsAppExtensionSche
3333
required_error: 'supports_moto is required',
3434
invalid_type_error: 'Value must be Boolean',
3535
}),
36-
encryption_certificate_fingerprint: zod
37-
.string()
38-
.min(1, {message: "Encryption certificate fingerprint can't be blank"}),
36+
encryption_certificate_fingerprint: zod.string(),
3937
checkout_payment_method_fields: zod
4038
.array(
4139
zod.object({

0 commit comments

Comments
 (0)