Skip to content

Instantly share code, notes, and snippets.

@nulpatrol
Last active August 3, 2018 06:50
Show Gist options
  • Save nulpatrol/97fa44b048b5a1f8853c5e09d1ac10c5 to your computer and use it in GitHub Desktop.
Save nulpatrol/97fa44b048b5a1f8853c5e09d1ac10c5 to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
version: '1.0'
title: 'Trainer API'
description: 'Trainer API description'
servers:
- url: 'http://new.trener.local/api/v1'
tags:
- name: "account"
description: "Account"
- name: "address"
description: "Address"
paths:
/account/sign-in:
post:
tags:
- "account"
summary: "Sign in"
operationId: "sign-in"
requestBody:
description: Credentials
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Credentials'
responses:
200:
description: "Successful request"
422:
description: "Validation error"
/subway/line/all:
get:
tags:
- "address"
summary: "Get all subway lines by city"
operationId: "subway-line-all"
parameters:
- in: query
name: city_id
schema:
type: integer
required: true
description: ID of city
responses:
200:
description: "Successful request"
422:
description: "Validation error"
/subway/station/all:
get:
tags:
- "address"
summary: "Get all subway stations by line or city"
operationId: "subway-station-all"
parameters:
- in: query
name: city_id
schema:
type: integer
description: ID of city
- in: query
name: line_id
schema:
type: integer
description: ID of line
responses:
200:
description: "Successful request"
422:
description: "Validation error"
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment