style: 统一全仓代码格式
This commit is contained in:
1 parent
d811478d0f
commit
8033cabff9
30 files changed
+1183
-187
No files matched your search
+53
-53
@@ -10,34 +10,34 @@ paths:
|
||||
get:
|
||||
operationId: getHealth
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: API health status
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Health'
|
||||
$ref: "#/components/schemas/Health"
|
||||
/public/brand:
|
||||
get:
|
||||
operationId: getPublicBrand
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Public brand profile
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BrandProfile'
|
||||
$ref: "#/components/schemas/BrandProfile"
|
||||
/public/services:
|
||||
get:
|
||||
operationId: listPublicServices
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Enabled public services
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/PublicService'
|
||||
$ref: "#/components/schemas/PublicService"
|
||||
/customer/session/wechat:
|
||||
post:
|
||||
operationId: createCustomerSession
|
||||
@@ -52,25 +52,25 @@ paths:
|
||||
code:
|
||||
type: string
|
||||
responses:
|
||||
'201':
|
||||
"201":
|
||||
description: Customer session token
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/TokenResponse'
|
||||
$ref: "#/components/schemas/TokenResponse"
|
||||
/customer/bookings:
|
||||
get:
|
||||
operationId: listCustomerBookings
|
||||
security: [bearerAuth: []]
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Current customer's bookings
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: "#/components/schemas/Booking"
|
||||
post:
|
||||
operationId: createCustomerBooking
|
||||
security: [bearerAuth: []]
|
||||
@@ -79,27 +79,27 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CreateBooking'
|
||||
$ref: "#/components/schemas/CreateBooking"
|
||||
responses:
|
||||
'201':
|
||||
"201":
|
||||
description: Created booking summary
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/BookingSummary'
|
||||
$ref: "#/components/schemas/BookingSummary"
|
||||
/customer/bookings/{id}/cancel:
|
||||
post:
|
||||
operationId: cancelCustomerBooking
|
||||
security: [bearerAuth: []]
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/BookingId'
|
||||
- $ref: "#/components/parameters/BookingId"
|
||||
responses:
|
||||
'201':
|
||||
"201":
|
||||
description: Cancelled booking
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: "#/components/schemas/Booking"
|
||||
/admin/session/login:
|
||||
post:
|
||||
operationId: createAdminSession
|
||||
@@ -108,14 +108,14 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/AdminLogin'
|
||||
$ref: "#/components/schemas/AdminLogin"
|
||||
responses:
|
||||
'201':
|
||||
"201":
|
||||
description: Admin session token
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/AdminTokenResponse'
|
||||
$ref: "#/components/schemas/AdminTokenResponse"
|
||||
/admin/bookings:
|
||||
get:
|
||||
operationId: listAdminBookings
|
||||
@@ -124,7 +124,7 @@ paths:
|
||||
- in: query
|
||||
name: status
|
||||
schema:
|
||||
$ref: '#/components/schemas/BookingStatus'
|
||||
$ref: "#/components/schemas/BookingStatus"
|
||||
- in: query
|
||||
name: unreadOnly
|
||||
schema:
|
||||
@@ -134,20 +134,20 @@ paths:
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Admin booking list
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: "#/components/schemas/Booking"
|
||||
/admin/bookings/unread-count:
|
||||
get:
|
||||
operationId: getAdminUnreadBookingCount
|
||||
security: [bearerAuth: []]
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Number of unread bookings
|
||||
content:
|
||||
application/json:
|
||||
@@ -161,55 +161,55 @@ paths:
|
||||
operationId: getAdminBooking
|
||||
security: [bearerAuth: []]
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/BookingId'
|
||||
- $ref: "#/components/parameters/BookingId"
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Admin booking detail
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: "#/components/schemas/Booking"
|
||||
/admin/bookings/{id}/status:
|
||||
post:
|
||||
operationId: updateAdminBookingStatus
|
||||
security: [bearerAuth: []]
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/BookingId'
|
||||
- $ref: "#/components/parameters/BookingId"
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/UpdateBookingStatus'
|
||||
$ref: "#/components/schemas/UpdateBookingStatus"
|
||||
responses:
|
||||
'201':
|
||||
"201":
|
||||
description: Updated booking
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Booking'
|
||||
$ref: "#/components/schemas/Booking"
|
||||
/admin/bookings/{id}/read:
|
||||
post:
|
||||
operationId: markAdminBookingRead
|
||||
security: [bearerAuth: []]
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/BookingId'
|
||||
- $ref: "#/components/parameters/BookingId"
|
||||
responses:
|
||||
'201':
|
||||
"201":
|
||||
description: Updated booking
|
||||
/admin/bookings/tags:
|
||||
get:
|
||||
operationId: listAdminTags
|
||||
security: [bearerAuth: []]
|
||||
responses:
|
||||
'200':
|
||||
"200":
|
||||
description: Enabled tags
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/Tag'
|
||||
$ref: "#/components/schemas/Tag"
|
||||
post:
|
||||
operationId: createAdminTag
|
||||
security: [bearerAuth: []]
|
||||
@@ -223,12 +223,12 @@ paths:
|
||||
properties:
|
||||
name: { type: string, maxLength: 24 }
|
||||
responses:
|
||||
'201':
|
||||
"201":
|
||||
description: Created tag
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Tag'
|
||||
$ref: "#/components/schemas/Tag"
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
@@ -253,13 +253,13 @@ components:
|
||||
properties:
|
||||
id: { type: string, format: uuid }
|
||||
name: { type: string }
|
||||
tagline: { type: [string, 'null'] }
|
||||
description: { type: [string, 'null'] }
|
||||
avatarUrl: { type: [string, 'null'], format: uri }
|
||||
coverUrl: { type: [string, 'null'], format: uri }
|
||||
hours: { type: [string, 'null'] }
|
||||
address: { type: [string, 'null'] }
|
||||
deliveryNote: { type: [string, 'null'] }
|
||||
tagline: { type: [string, "null"] }
|
||||
description: { type: [string, "null"] }
|
||||
avatarUrl: { type: [string, "null"], format: uri }
|
||||
coverUrl: { type: [string, "null"], format: uri }
|
||||
hours: { type: [string, "null"] }
|
||||
address: { type: [string, "null"] }
|
||||
deliveryNote: { type: [string, "null"] }
|
||||
PublicService:
|
||||
type: object
|
||||
required: [id, name, description, bookingEnabled]
|
||||
@@ -267,9 +267,9 @@ components:
|
||||
id: { type: string, format: uuid }
|
||||
name: { type: string }
|
||||
description: { type: string }
|
||||
coverUrl: { type: [string, 'null'], format: uri }
|
||||
priceText: { type: [string, 'null'] }
|
||||
priceAmount: { type: [integer, 'null'], minimum: 0 }
|
||||
coverUrl: { type: [string, "null"], format: uri }
|
||||
priceText: { type: [string, "null"] }
|
||||
priceAmount: { type: [integer, "null"], minimum: 0 }
|
||||
bookingEnabled: { type: boolean }
|
||||
BookingStatus:
|
||||
type: string
|
||||
@@ -298,23 +298,23 @@ components:
|
||||
extraData: { type: object, additionalProperties: true }
|
||||
items:
|
||||
type: array
|
||||
items: { $ref: '#/components/schemas/BookingItemInput' }
|
||||
items: { $ref: "#/components/schemas/BookingItemInput" }
|
||||
BookingSummary:
|
||||
type: object
|
||||
required: [bookingNo, status, estimatedAmount, createdAt]
|
||||
properties:
|
||||
bookingNo: { type: string }
|
||||
status: { $ref: '#/components/schemas/BookingStatus' }
|
||||
estimatedAmount: { type: [integer, 'null'] }
|
||||
status: { $ref: "#/components/schemas/BookingStatus" }
|
||||
estimatedAmount: { type: [integer, "null"] }
|
||||
createdAt: { type: string, format: date-time }
|
||||
Booking:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/BookingSummary'
|
||||
- $ref: "#/components/schemas/BookingSummary"
|
||||
- type: object
|
||||
properties:
|
||||
id: { type: string, format: uuid }
|
||||
customerName: { type: string }
|
||||
adminNote: { type: [string, 'null'] }
|
||||
adminNote: { type: [string, "null"] }
|
||||
AdminLogin:
|
||||
type: object
|
||||
required: [username, password]
|
||||
@@ -328,7 +328,7 @@ components:
|
||||
token: { type: string }
|
||||
AdminTokenResponse:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/TokenResponse'
|
||||
- $ref: "#/components/schemas/TokenResponse"
|
||||
- type: object
|
||||
required: [displayName]
|
||||
properties:
|
||||
@@ -337,7 +337,7 @@ components:
|
||||
type: object
|
||||
required: [status]
|
||||
properties:
|
||||
status: { $ref: '#/components/schemas/BookingStatus' }
|
||||
status: { $ref: "#/components/schemas/BookingStatus" }
|
||||
adminNote: { type: string }
|
||||
Tag:
|
||||
type: object
|
||||
|
||||
Reference in new issue
Block a user