Skip to content

Commit

Permalink
add openapi
Browse files Browse the repository at this point in the history
  • Loading branch information
jamalsoueidan committed Dec 11, 2023
1 parent 47f9d81 commit 8e38d25
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ components:
$ref: paths/shipping/create/response.yaml
ShippingCalculateResponse:
$ref: paths/shipping/calculate/response.yaml
ShippingGetResponse:
$ref: paths/shipping/get/response.yaml

# Orchestrators
UploadBody:
Expand Down Expand Up @@ -371,6 +373,8 @@ paths:
$ref: "./paths/shipping/create/index.yaml"
/shipping/calculate:
$ref: "./paths/shipping/calculate/index.yaml"
/shipping/{shippingId}:
$ref: "./paths/shipping/get/index.yaml"

# Orchestrators
/orchestrators/upload:
Expand Down
31 changes: 31 additions & 0 deletions openapi/paths/shipping/get/index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
get:
parameters:
- name: shippingId
in: path
required: true
schema:
type: string

tags:
- Shipping
operationId: shippingGet
summary: GET Get shipping
description: This endpoint gets shipping object
responses:
"200":
description: Response with payload
content:
application/json:
schema:
$ref: "./response.yaml"

"400":
$ref: "../../../responses/bad.yaml"
"401":
$ref: "../../../responses/unauthorized.yaml"
"403":
$ref: "../../../responses/forbidden.yaml"
"404":
$ref: "../../../responses/not-found.yaml"

security: []
10 changes: 10 additions & 0 deletions openapi/paths/shipping/get/response.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: object
properties:
success:
type: boolean
example: true
payload:
$ref: ../_types/shipping.yaml
required:
- success
- payload

0 comments on commit 8e38d25

Please sign in to comment.