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

Add GET /api/info endpoint #31

Open
wants to merge 1 commit 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
60 changes: 59 additions & 1 deletion standard-covoiturage_openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ paths:
/status:
get:
tags:
- status
- API information
summary: Give health status of the webservice.
responses:
200:
Expand All @@ -189,6 +189,36 @@ paths:
500:
$ref: '#/components/responses/InternalServerError'

/api/info:
get:
tags:
- API information
summary: describes the running API implementation
description: Gives the version of the running API, and the available endpoints.
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: object
required:
- version
- baseUrl
- endpoints
properties:
version:
type: string
description: Version of the running API
baseUrl:
type: string
description: base url of the API
endpoints:
type: array
description: List of endpoints with their implementation status
items:
$ref: "#/components/schemas/Endpoint"

#
# Schemas
#
Expand Down Expand Up @@ -621,6 +651,34 @@ components:
type: string
description: Brand of the car.

Endpoint:
type: object
description: a formal description of an endpoint.
required:
- method
- path
- status
properties:
method:
type: string
enum: [
POST,
PUT,
GET,
DELETE,
PATCH
]
path:
description: the exact path of the endpoint, starting after the base URL
type: string
example: /bookings
status:
type: string
enum: [
NOT_IMPLEMENTED,
IMPLEMENTED
]

responses:
BadRequest:
description: Bad Request. See error message.
Expand Down