-
Notifications
You must be signed in to change notification settings - Fork 2
MP-7858 boolean return question answers #1266
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
Merged
yoerriwalstra
merged 8 commits into
develop
from
feature/MP-7858-boolean-return-question-answers
Feb 12, 2026
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
254a671
:construction: Adding answer_type on return questions.
NickVries 976d415
Added answer_type to patch endpoint request
daniel-myparcel f2cdb7f
Move questions attached to a return reason to its own schema
daniel-myparcel 17bb7e5
Introduce ReturnQuestionAnswerType schema for reusability
daniel-myparcel 5639f31
Rename ReturnReasonQuestionAttachment to ShopReturnReasonQuestion
daniel-myparcel aa8b9b6
add maxLength 255 to notes
daniel-myparcel b82adcb
add answer_type to ShopReturnReasonQuestion
daniel-myparcel b3a05f1
reorder attrs
daniel-myparcel 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
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
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
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 |
|---|---|---|
|
|
@@ -25,6 +25,9 @@ | |
| } | ||
| } | ||
| ] | ||
| }, | ||
| "answer_type": { | ||
| "$ref": "#/components/schemas/ReturnQuestionAnswerType" | ||
| } | ||
| } | ||
| } | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -20,6 +20,9 @@ | |
| } | ||
| } | ||
| ] | ||
| }, | ||
| "answer_type": { | ||
| "$ref": "#/components/schemas/ReturnQuestionAnswerType" | ||
| } | ||
| } | ||
| } | ||
|
|
||
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
9 changes: 9 additions & 0 deletions
9
specification/schemas/return-questions/ReturnQuestionAnswerType.json
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "type": "string", | ||
| "enum": [ | ||
| "string", | ||
| "boolean" | ||
| ], | ||
| "example": "string", | ||
| "description": "The type of answer expected for this question." | ||
| } |
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
35 changes: 35 additions & 0 deletions
35
specification/schemas/return-reasons/ShopReturnReasonQuestion.json
yoerriwalstra marked this conversation as resolved.
Show resolved
Hide resolved
|
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 |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| { | ||
| "type": "object", | ||
| "additionalProperties": false, | ||
| "required": [ | ||
| "code", | ||
| "is_required" | ||
| ], | ||
| "properties": { | ||
yoerriwalstra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "code": { | ||
| "type": "string", | ||
| "description": "The code of the shop return question", | ||
| "example": "what-size" | ||
| }, | ||
| "is_required": { | ||
| "type": "boolean", | ||
| "description": "Indication whether a consumer is required to answer this question related to the selected return reason", | ||
| "example": true | ||
| }, | ||
| "answer_type": { | ||
| "$ref": "#/components/schemas/ShopReturnReasonQuestionAnswerType" | ||
| }, | ||
| "yes_note": { | ||
yoerriwalstra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "type": "string", | ||
| "maxLength": 255, | ||
| "description": "A note to show the user when they answer a `boolean` type question with `true`. Will be shown in the return portal.", | ||
| "example": "This product can't be returned after its been used. Proceeding will lead to a rejected return request." | ||
| }, | ||
| "no_note": { | ||
| "type": "string", | ||
| "maxLength": 255, | ||
| "description": "A note to show the user when they answer a `boolean` type question with `false`. Will be shown in the return portal.", | ||
| "example": "This product cannot be returned after it was unsealed. Proceeding will lead to a rejected return request." | ||
| } | ||
| } | ||
| } | ||
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.
Uh oh!
There was an error while loading. Please reload this page.