-
Notifications
You must be signed in to change notification settings - Fork 58
PROMO-1256 PROMO-1257 PROMO-1296: Added prefix, suffix, delimiter, exclude_characters and code_length fields for bulk coupon api /v3/promotions/{promotion id}/codegen #1090
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -320,6 +320,38 @@ paths: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| example: 5 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| minimum: 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maximum: 100000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prefix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pattern: '[A-Z0-9_-]' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| description: The fixed text that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| example: PRE | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| maxLength: 20 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| suffix: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pattern: '[A-Z0-9_-]' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+324
to
+330
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pattern: '[A-Z0-9_-]' | |
| type: string | |
| description: 'The fixed text or characters that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.' | |
| example: PRE- | |
| maxLength: 20 | |
| suffix: | |
| pattern: '[A-Z0-9_-]' | |
| pattern: '[A-Z0-9_-]*' | |
| type: string | |
| description: 'The fixed text or characters that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.' | |
| example: PRE- | |
| maxLength: 20 | |
| suffix: | |
| pattern: '[A-Z0-9_-]*' |
Copilot
AI
Sep 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex pattern '[A-Z0-9_-]' only matches a single character, but the field descriptions indicate these are for text/strings that can contain multiple characters. The pattern should be '[A-Z0-9_-]*' or '[A-Z0-9_-]+' to match zero or more, or one or more characters respectively.
| pattern: '[A-Z0-9_-]' | |
| type: string | |
| description: 'The fixed text or characters that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.' | |
| example: PRE- | |
| maxLength: 20 | |
| suffix: | |
| pattern: '[A-Z0-9_-]' | |
| pattern: '[A-Z0-9_-]*' | |
| type: string | |
| description: 'The fixed text or characters that will appear at the beginning of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.' | |
| example: PRE- | |
| maxLength: 20 | |
| suffix: | |
| pattern: '[A-Z0-9_-]*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably we don't need to wrap text inside those single quotes ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also applied to other lines in PR as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey Anshu, may you pls help to update the doc for this comment as well ?