Last active
May 3, 2020 22:04
-
-
Save su8ru/e0cbb5e47db8c7e4074b290c35d204be to your computer and use it in GitHub Desktop.
KO・S Train Location Back-end API Documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
version: 1.0.0 | |
title: KO・S Train Location Back-end | |
contact: | |
name: su8ru | |
email: [email protected] | |
servers: | |
- url: https://kostl.su8ru.app | |
- url: http://localhost:8000 # for local test | |
paths: | |
/vehicles: | |
post: | |
summary: post vehicle info | |
tags: | |
- vehicle | |
requestBody: | |
description: vehicle info | |
content: | |
application/json: | |
schema: | |
type: object | |
required: | |
- unyo | |
- vehicle | |
properties: | |
unyo: | |
type: string | |
vehicle: | |
type: string | |
responses: | |
201: | |
description: post successful | |
content: | |
application/json: | |
schema: | |
type: object | |
400: | |
description: some params are invalid | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Error' | |
get: | |
summary: get all unyo vehicles info | |
tags: | |
- vehicle | |
responses: | |
200: | |
description: all unyo vehicles info | |
content: | |
application/json: | |
schema: | |
type: object | |
additionalProperties: | |
type: array | |
items: | |
type: object | |
properties: | |
vehicle: | |
type: string | |
datetime: | |
type: string | |
example: | |
{ | |
51K: [ | |
{ vehicle: "5732F", datetime: "2020-04-01T01:00:00Z"}, | |
{ vehicle: "5736F", datetime: "2020-04-01T08:00:00Z"} | |
], | |
3T: [ | |
{ vehicle: "360F", datetime: "2020-04-01T01:00:00Z"} | |
], | |
No.12: [ | |
{ vehicle: "7802F+7702F", datetime: "2020-04-01T08:00:00Z"} | |
] | |
} | |
components: | |
schemas: | |
Error: | |
type: object | |
required: | |
- code | |
- message | |
properties: | |
code: | |
type: integer | |
format: int32 | |
message: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment