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.
What's changed?
移除
POST /orders
中在delivery_info
內的firstname
、lastname
以及email
,共 3 個欄位。因為經過討論,我們的 order 在新增(POST) 時會自動透過當前登入之使用者的身分查詢其上述欄位,不會讓使用者再次輸入,故移除。
Details
因為這個
order_payload
於 Swagger API 中的 definition 是被 reuse 的,所以影響到了其他 route 中的 definition(order_response
)。也因為不能只抽換部分 properties 的緣故,重新定義了一個和order_payload
相像的order_payload_with_user_info
來給其他仍需要回傳firstname
、lastname
以及email
的 definition 使用。What to review?
/orders
的各個 route 是否都有正常顯示order_payload_with_user_info
)是否符合我們的慣例