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

get {locations_endpoint_url}/{location_id}[/{evse_uid}][/{connector_id}] #16

Merged
merged 4 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 7 additions & 0 deletions openapi/components/parameters/connectorId.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: connector_id
in: path
required: true
schema:
type: string
maxLength: 36
example: 1
7 changes: 7 additions & 0 deletions openapi/components/parameters/evseUid.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: evse_uid
in: path
required: true
schema:
type: string
maxLength: 36
example: 3256
7 changes: 7 additions & 0 deletions openapi/components/parameters/locationId.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: location_id
in: path
required: true
schema:
type: string
maxLength: 36
example: LOC1
6 changes: 5 additions & 1 deletion openapi/components/responses/BaseResponse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ required:
- timestamp
properties:
data:
description: Contains the actual response data object or list of objects from each request, depending on the cardinality of the response data, this is an array (card. * or +), or a single object (card. 1 or ?)
description: |
* or ?
Contains the actual response data object or list of objects from each request, depending on the cardinality of the response data, this is an array (card. * or +), or a single object (card. 1 or ?)
status_code:
type: number
example: 200
status_message:
type: string
example: OK
timestamp:
type: string
format: date-time
Expand Down
9 changes: 9 additions & 0 deletions openapi/components/responses/Location.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: Location
content:
application/json:
schema:
allOf:
- $ref: ./BaseResponse.yaml
- properties:
data:
$ref: ../schemas/Location.yaml
6 changes: 6 additions & 0 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ paths:
$ref: paths/credentials.yaml
/locations:
$ref: paths/locations.yaml
/locations/{location_id}:
$ref: paths/locations_{location_id}.yaml
/locations/{location_id}/{evse_uid}:
$ref: paths/locations_{location_id}_{evse_uid}.yaml
/locations/{location_id}/{evse_uid}/{connector_id}:
$ref: paths/locations_{location_id}_{evse_uid}_{connector_id}.yaml

components:
securitySchemes:
Expand Down
16 changes: 16 additions & 0 deletions openapi/paths/locations_{location_id}.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
get:
tags:
- Locations
summary: Sender /locations/{location_id}
operationId: getLocation_by_location_id
security:
- tokenAuth: []
parameters:
- $ref: ../components/parameters/locationId.yaml
responses:
"200":
$ref: ../components/responses/Location.yaml
"400":
$ref: ../components/responses/BadRequest.yaml
"404":
$ref: ../components/responses/NotFound.yaml
17 changes: 17 additions & 0 deletions openapi/paths/locations_{location_id}_{evse_uid}.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
get:
tags:
- Locations
summary: Sender /locations/{location_id}/{evse_uid}
operationId: getLocation_by_location_id_evse_uid
security:
- tokenAuth: []
parameters:
- $ref: ../components/parameters/locationId.yaml
- $ref: ../components/parameters/evseUid.yaml
responses:
"200":
$ref: ../components/responses/Location.yaml
"400":
$ref: ../components/responses/BadRequest.yaml
"404":
$ref: ../components/responses/NotFound.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
get:
tags:
- Locations
summary: Sender /locations/{location_id}/{evse_uid}]/[{connector_id}
operationId: getLocation_by_location_id_evse_uid_connector_id
security:
- tokenAuth: []
parameters:
- $ref: ../components/parameters/locationId.yaml
- $ref: ../components/parameters/evseUid.yaml
- $ref: ../components/parameters/connectorId.yaml
responses:
"200":
$ref: ../components/responses/Location.yaml
"400":
$ref: ../components/responses/BadRequest.yaml
"404":
$ref: ../components/responses/NotFound.yaml