fix: broken upload of attachment via api#8156
Open
Somebodyisnobody wants to merge 1 commit into
Open
Conversation
fixes an issue raised in 5cf4861 as `$data` is not required but was marked as required. Signed-off-by: Somebodyisnobody <35230554+Somebodyisnobody@users.noreply.github.com>
Contributor
Author
|
Backlink #7258 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes an issue that prevents a user from uploading any attachment to a card by using the api endpoint POST /boards/{boardId}/stacks/{stackId}/cards/{cardId}/attachments which in practice broke the endpoint completely. The issue was raised in 5cf4861 as
$dataof AttachmentApiController::create() is not required but was marked as required.TODO
--
Checklist
Do you really want a unit test for checking if a parameter is optional?
A general remark: This repository should have API tests, that covers basic cases of the api documented under https://deck.readthedocs.io/en/stable/API. This broken api controller could have been avoided with a simple, static multipart/form-data request to create an attachment.
I am not able to write such tests in PHP otherwise I would have done it. But maybe someone ready this and has some time :)