Skip to content
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

修復 orders 的 API 文件和 route 實作分歧的部分 #174

Open
wants to merge 2 commits into
base: backend
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 47 additions & 1 deletion backend/api/order/orders/get.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,50 @@ definitions:
description: The status of the delivery.
example: PENDING
detail:
$ref: '#/definitions/order_payload'
$ref: '#/definitions/order_payload_with_user_info'

# The "order_payload" from post can't be reused since we need some extra
# properties here.
order_payload_with_user_info:
type: object
properties:
items:
type: array
items:
type: object
properties:
id:
type: integer
count:
type: integer
date:
type: integer
note:
type: string
delivery_info:
type: object
properties:
firstname:
type: string
lastname:
type: string
email:
type: string
phone_number:
type: string
address:
type: string
example:
items:
- id: 3
count: 5
- id: 5
count: 7
note: "No Iansui"
date: 1672737308
delivery_info:
firstname: Han-Xuan
lastname: Huang
email: test@test.com
phone_number: 0921474836
address: No. 1, Sec. 3, Zhongxiao E. Rd., Da'an Dist., Taipei City 106344 , Taiwan (R.O.C.)
10 changes: 0 additions & 10 deletions backend/api/order/orders/post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,6 @@ definitions:
delivery_info:
type: object
properties:
firstname:
type: string
lastname:
type: string
email:
type: string
phone_number:
type: string
address:
Expand All @@ -100,9 +94,5 @@ definitions:
note: "No Iansui"
date: 1672737308
delivery_info:
firstname: Han-Xuan
lastname: Huang
email: test@test.com
phone_number: 0921474836
address: No. 1, Sec. 3, Zhongxiao E. Rd., Da'an Dist., Taipei City 106344 , Taiwan (R.O.C.)