Skip to content

Commit a6d1c43

Browse files
feat: Add API endpoint for retrieving shape by ID
1 parent 43e1560 commit a6d1c43

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

openapi.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,32 @@ paths:
976976
$ref: '#/components/schemas/BlockResponse'
977977
required:
978978
- data
979+
980+
/api/where/shape/{shapeID}.json:
981+
get:
982+
summary: Retrieve a shape by ID
983+
description: 'Retrieve a shape (the path traveled by a transit vehicle) by ID.'
984+
parameters:
985+
- name: shapeID
986+
in: path
987+
required: true
988+
description: The shape ID, encoded directly in the URL
989+
schema:
990+
type: string
991+
responses:
992+
'200':
993+
description: The shape of the path traveled by the transit vehicle
994+
content:
995+
application/json:
996+
schema:
997+
allOf:
998+
- $ref: '#/components/schemas/ResponseWrapper'
999+
- type: object
1000+
properties:
1001+
data:
1002+
$ref: '#/components/schemas/ShapeResponse'
1003+
required:
1004+
- data
9791005
components:
9801006
securitySchemes:
9811007
ApiKeyAuth:
@@ -2408,6 +2434,28 @@ components:
24082434
- distanceAlongBlock
24092435
- accumulatedSlackTime
24102436

2437+
ShapeResponse:
2438+
type: object
2439+
properties:
2440+
entry:
2441+
type: object
2442+
properties:
2443+
length:
2444+
type: integer
2445+
levels:
2446+
type: string
2447+
points:
2448+
type: string
2449+
description: Encoded polyline format representing the shape of the path
2450+
required:
2451+
- length
2452+
- points
2453+
references:
2454+
$ref: '#/components/schemas/Reference'
2455+
required:
2456+
- entry
2457+
- references
2458+
24112459
SearchRouteResponse:
24122460
type: object
24132461
properties:

0 commit comments

Comments
 (0)