Skip to content

Commit

Permalink
update openapi description
Browse files Browse the repository at this point in the history
  • Loading branch information
jamalsoueidan committed Nov 10, 2023
1 parent 5cf4b6a commit 76e4779
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 69 deletions.
12 changes: 3 additions & 9 deletions openapi/paths/customer/location/_types/location.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,11 @@ properties:
fixedRatePerKm:
type: number
minDriveDistance:
oneOf:
- type: number
- type: string
type: number
maxDriveDistance:
oneOf:
- type: number
- type: string
type: number
startFee:
oneOf:
- type: number
- type: string
type: number

required:
- _id
Expand Down
24 changes: 6 additions & 18 deletions openapi/paths/customer/location/create/body.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,17 @@ properties:
type: string
enum: [home, commercial]
distanceForFree:
oneOf:
- type: number
- type: string
type: number
distanceHourlyRate:
oneOf:
- type: number
- type: string
type: number
fixedRatePerKm:
oneOf:
- type: number
- type: string
type: number
minDriveDistance:
oneOf:
- type: number
- type: string
type: number
maxDriveDistance:
oneOf:
- type: number
- type: string
type: number
startFee:
oneOf:
- type: number
- type: string
type: number
locationType:
type: string
enum: [origin, destination]
Expand Down
24 changes: 6 additions & 18 deletions openapi/paths/customer/location/update/body.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,14 @@ properties:
type: string
enum: [home, commercial]
distanceForFree:
oneOf:
- type: number
- type: string
type: number
distanceHourlyRate:
oneOf:
- type: number
- type: string
type: number
fixedRatePerKm:
oneOf:
- type: number
- type: string
type: number
minDriveDistance:
oneOf:
- type: number
- type: string
type: number
maxDriveDistance:
oneOf:
- type: number
- type: string
type: number
startFee:
oneOf:
- type: number
- type: string
type: number
12 changes: 3 additions & 9 deletions openapi/paths/customer/product/upsert/body.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@ properties:
scheduleId:
type: string
variantId:
oneOf:
- type: string
- type: number
type: number
duration:
oneOf:
- type: string
- type: number
type: number
breakTime:
oneOf:
- type: string
- type: number
type: number
noticePeriod:
$ref: ../../schedule/_types/product-notice-period.yaml
bookingPeriod:
Expand Down
8 changes: 2 additions & 6 deletions openapi/paths/customer/schedule/_types/base-product.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ properties:
description:
type: string
duration:
oneOf:
- type: string
- type: number
type: number
breakTime:
oneOf:
- type: string
- type: number
type: number
noticePeriod:
$ref: "./product-notice-period.yaml"
bookingPeriod:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
type: object
properties:
value:
oneOf:
- type: string
- type: number
type: number
unit:
$ref: "./product-booking-unit.yaml"
default: "months"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
type: object
properties:
value:
oneOf:
- type: string
- type: number
type: number
unit:
$ref: "./product-notice-unit.yaml"
default: "hours"
Expand Down
16 changes: 13 additions & 3 deletions openapi/paths/customer/schedule/slots/update/body.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
type: array
items:
$ref: ../../_types/slot.yaml
type: object
properties:
day:
$ref: ../../_types/day.yaml
intervals:
type: array
minimum: 1
items:
$ref: ../../_types/interval.yaml

required:
- day
- intervals

0 comments on commit 76e4779

Please sign in to comment.