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

WIP Next return Journey feature #19

Open
wants to merge 2 commits into
base: WIP-operator-complete-api-initial-version
Choose a base branch
from
Open
Changes from all 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
44 changes: 44 additions & 0 deletions standard-covoiturage_openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,43 @@ paths:
500:
$ref: '#/components/responses/InternalServerError'

/journeys:
get:
tags:
- List
summary: Get journeys by their ids.
description: Route used to retrieve journeys using their identifiers.
operationId: getJourneys
parameters:
- in: query
name: ids[]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should put the brackets in the name, as we have not at other places.

required: true
explode: true
schema:
type: array
items:
type: string
minLength: 1
maxLength: 255
responses:
200:
description: Ok. Request processed successfully.
content:
application/json:
schema:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This endpoint takes several ids and returns a single journey - I believe you meant to return an array here, right?

title: Journey
oneOf:
- $ref: '#/components/schemas/DriverJourney'
- $ref: '#/components/schemas/PassengerJourney'
400:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/Unauthorized'
429:
$ref: '#/components/responses/TooManyRequests'
500:
$ref: '#/components/responses/InternalServerError'

/status:
get:
tags:
Expand Down Expand Up @@ -444,6 +481,7 @@ components:
JourneySchedule:
type: object
required:
- id
- passengerPickupDate
- type
- webUrl
Expand Down Expand Up @@ -474,6 +512,12 @@ components:
- PLANNED
- DYNAMIC
- LINE
nextReturnJourneyId:
type: string
minLength: 1
maxLength: 255
description: Id of next Journey in the return direction.


DriverJourney:
type: object
Expand Down