-
Notifications
You must be signed in to change notification settings - Fork 51
PROMO-1256: Added prefix, suffix and code_length fields for bulk coup… #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
Draft
bc-anshumishra
wants to merge
6
commits into
main
Choose a base branch
from
PROMO-1256
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+32
−0
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4e75625
PROMO-1256: Added prefix, suffix and code_length fields for bulk coup…
bc-anshumishra bc5b78b
PROMO-1256: addressed PR comments
bc-anshumishra b585610
PROMO-1256: addressed PR comments
bc-anshumishra 92b93c6
PROMO-1257: Added optional delimiter field for bulk coupon api /v3/pr…
bc-anshumishra 2a2d7bb
PROMO-1296 Added exclude_characters field for bulk coupon api /v3/pro…
bc-anshumishra 121a50b
PROMO-1296 Added required sibling items field for type:array
bc-anshumishra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_-]' | ||
type: string | ||
description: 'The fixed text that will appear at the end of every generated coupon code. Only capital letters, numbers, underscores and hyphens are allowed.' | ||
example: POST | ||
maxLength: 20 | ||
delimiter: | ||
pattern: '[_-]' | ||
type: string | ||
description: 'An optional single character (_ or -) that will be placed between the prefix and the randomly generated code, and again between the randomly generated code and the suffix. It will only be applied if a valid prefix or suffix is present.' | ||
example: _ | ||
maxLength: 1 | ||
exclude_characters: | ||
pattern: '[A-Z0-9]' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this pattern belong to the "items", not directly in exclude_characters ? |
||
type: array | ||
items: | ||
type: string | ||
description: 'An optional array of single length string elements to exclude from the generated coupon codes. Only capital letters and numbers are allowed. The default value is an empty array [].' | ||
example: ["1", "2", "3", "4", "5", "A", "B", "C", "D", "E"] | ||
maxLength: 26 | ||
code_length: | ||
type: integer | ||
description: 'The length of the random string to be generated for each coupon code. The value must be between 6 and 16. The default length is 16. The total length of each generated coupon code is calculated as: `code_length` + length of `prefix` + length of `suffix`. The maximum total length of a coupon code is 50.' | ||
example: 10 | ||
minimum: 6 | ||
maximum: 16 | ||
required: true | ||
responses: | ||
'201': | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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