Skip to content

Instantly share code, notes, and snippets.

@IlyaSkriblovsky
Created November 3, 2016 21:20
Show Gist options
  • Save IlyaSkriblovsky/2d4bb6c8371a429c48e46fa68434295f to your computer and use it in GitHub Desktop.
Save IlyaSkriblovsky/2d4bb6c8371a429c48e46fa68434295f to your computer and use it in GitHub Desktop.
swagger: '2.0'
info:
title: ZONT API
description: Управляйте вашими устройствами
version: "1.0.0"
host: zont-online.ru
schemes:
- https
basePath: /api
produces:
- application/json
consumes:
- application/json
paths:
/path:
post:
summary: Получить GPS-трек
description: |
some long description goes here
parameters:
- name: X-ZONT-Client
in: header
required: true
type: string
- name: query
in: body
description: идентификатор устройства
required: true
schema:
$ref: '#/definitions/PathRequest'
responses:
200:
description: GPS-трек
schema:
type: object
properties:
gps:
type: array
items:
type: integer
description: массив GPS-координат
default:
description: ошибка
security:
- user_auth: []
securityDefinitions:
user_auth:
type: "basic"
definitions:
PathRequest:
type: object
properties:
device_id:
type: integer
mintime:
type: integer
maxtime:
type: integer
example:
device_id: 1209
mintime: 1477947600
maxtine: 1478034000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment