Skip to content

Commit

Permalink
Merge branch 'main' into ringgo-implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPowellRinggo authored Jun 21, 2022
2 parents 192ccb4 + f62dce6 commit 7e33ef3
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 29 deletions.
12 changes: 11 additions & 1 deletion data/parkimeter/availability.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@
"id": "ringgo-1901",
"available": true,
"count": null
}
},
{
"id": "pm-12345",
"available": true,
"count": 10
},
{
"id": "pm-98764",
"available": true,
"count": 1000
}
]
}
11 changes: 11 additions & 0 deletions data/parkimeter/booking.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"booking": {
"id": "100000",
"location_id": "pk-139",
"rate_id": "pk-7272",
"customer_id": "1",
"start_time": "2022-06-21T09:00:00Z",
"stop_time": "2022-06-21T11:00:00Z",
"status": "pending"
}
}
5 changes: 5 additions & 0 deletions data/parkimeter/charge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"charge": {
"status": "paid"
}
}
135 changes: 107 additions & 28 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,68 @@ servers:
- url: https://api.parkmobile.io/availability/v1
description: Production (Internal)
paths:
"/":
x-public: true
get:
summary: This is the root path
operationId: getNothing
tags:
- root
responses:
'200':
description: Success
content:
application/json:
schema:
"$ref": "#/components/schemas/Response"
'400':
description: The Input from the user was malformed
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
example:
error: Bad Request Error
error_code: AV-1001
'401':
description: Authorization value is missing for the header or the credentials
provided are incorrect
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
example:
status_code: 401
error_message: Authorization Error
'403':
description: The account specified does not have the required role(s) to
access the resource
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
example:
status_code: 403
error_message: Invalid Access Rights Error
'404':
description: Attempting to access invalid routes
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
example:
status_code: 404
error_message: Page Not Found
'500':
description: An error occurred on the server. The response body includes
details of the specific error
content:
application/json:
schema:
"$ref": "#/components/schemas/Error"
example:
error: Internal Server Error
error_code: AV-1010
"/availability":
x-public: true
get:
Expand Down Expand Up @@ -86,9 +148,6 @@ paths:
example:
error: Internal Server Error
error_code: AV-1010
security:
- api_key: []
x-codegen-request-body-name: Body
"/locations":
x-public: true
get:
Expand Down Expand Up @@ -134,8 +193,6 @@ paths:
example:
status_code: 404
error_message: Page Not Found
security:
- api_key: []
"/rates":
x-public: true
get:
Expand Down Expand Up @@ -165,23 +222,10 @@ paths:
schema:
type: string
- in: query
name: streets
name: vehicle_types
required: true
schema:
type: array
items:
type: object
properties:
name:
type: string
enum:
- car
- motorcyle
- Standard Auto
- Oversized Vehicle
example:
vehicle_types: ["car", "motorcycle"]
description: Vechile types that are allowed to park in the selected location
type: string
- in: query
name: access_type
required: true
Expand Down Expand Up @@ -228,8 +272,6 @@ paths:
example:
status_code: 404
error_message: Page Not Found
security:
- api_key: []
"/booking":
x-public: false
post:
Expand Down Expand Up @@ -295,8 +337,6 @@ paths:
example:
status_code: 404
error_message: Page Not Found
security:
- api_key: []
"/charge":
x-public: false
post:
Expand Down Expand Up @@ -342,8 +382,6 @@ paths:
example:
status_code: 404
error_message: Page Not Found
security:
- api_key: []
components:
schemas:
Error:
Expand All @@ -368,7 +406,7 @@ components:
id:
type: string
example: pk-139
description: Internal unique identifier
description: Internal unique identifier (can be used as location_id)
name:
type: string
example: State Farm Arena
Expand Down Expand Up @@ -396,7 +434,48 @@ components:
count:
type: number
example: 100
description: The amount of spaces that are avai
description: The amount of spaces that are available
vehicle_types:
type: array
items:
type: object
properties:
name:
type: object
properties:
name:
type: string
enum:
- car
- motorcyle
- Standard Auto
- Oversized Vehicle
description: Vechile types that are allowed to park in the selected location
description: Array of vehicle types
description: Array of vehicle types
rate_id:
type: string
example: pk-7272
description: Rate unique identifier
customer_id:
type: string
example: "1"
description: Customer unique identifier
start_time:
type: string
example: "2022-06-21T09:00:00Z"
description: Booking start time, in ISO 8601 format
stop_time:
type: string
example: "2022-06-21T11:00:00Z"
description: Booking stop time, in ISO 8601 format
status:
type: string
description: Booking status
enum:
- pending
- paid
example: pending
error:
type: string
description: An error code to give Easypark Availability specific error
Expand Down

0 comments on commit 7e33ef3

Please sign in to comment.