Advertisement
Guest User

Untitled

a guest
Feb 16th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 5.33 KB | None | 0 0
  1. ---
  2. swagger: '2.0'
  3. info:
  4.   version: 1.0.0
  5.   title: Web AutoPrice Service
  6.   description: |
  7.    #### API взаимодействия с сервисом Веб-АвтоПрайс.
  8. schemes:
  9.  - http
  10. host: wap-server.loc
  11.  
  12. basePath: /api/v1
  13.  
  14. securityDefinitions:
  15.   token:
  16.     type: apiKey
  17.     in: query
  18.     name: token
  19. security:
  20.   - token: []
  21.  
  22. paths:
  23.   /selfprices:
  24.     get:
  25.       tags: ["Selprice"]
  26.       summary: список конфигураций
  27.       # Expected responses for this operation:
  28.       responses:
  29.        # Response code
  30.         200:
  31.           description: Массив конфигураций
  32.           schema:
  33.             type: array
  34.             items:
  35.               $ref: '#/definitions/SelfpriceFull'
  36.                  
  37.   /selfprice/{id}:
  38.     parameters:
  39.       - name: id
  40.         in: path
  41.         description: ID конфигурации
  42.         type: string
  43.         required: true
  44.     get:
  45.       tags: ["Selprice"]
  46.       summary: получение конфигурации по ID
  47.       responses:
  48.         200:
  49.           description: объект конфигурации
  50.           schema:
  51.             $ref: '#/definitions/SelfpriceFull'  
  52.                  
  53.     put:
  54.       tags: ["Selprice"]
  55.       summary: изменение конфигурации по ID    
  56.       responses:
  57.         201:
  58.           description: изменение записи
  59.       parameters:
  60.        -
  61.           in: body
  62.           name: body
  63.           required: true
  64.           description: сущность конфигурации
  65.           schema:
  66.             $ref: '#/definitions/Selfprice'              
  67.                  
  68. definitions:
  69.   SelfpriceFull:
  70.     type: object
  71.     description: полная конфигурация правила загрузки прайса
  72.     allOf:
  73.       - $ref: '#/definitions/Selfprice'
  74.       - type: object
  75.     properties:
  76.         Id:
  77.           type: integer
  78.           description: ключ
  79.   Selfprice:
  80.     type: object
  81.     description: конфигурация правила загрузки прайса
  82.     properties:
  83.       File:
  84.         type: string
  85.         description: наименование файла
  86.       PrvId:
  87.         type: integer
  88.         description: ID поставщика
  89.       Username:
  90.         type: string
  91.         description: имя пользователя создавшей запись
  92.       RequestState:
  93.         type: integer
  94.         description: состояние
  95.         default: 0
  96.       AutoType:
  97.         type: string
  98.         description: тип автоматической загрузки
  99.         enum: [none,url,ftp,mail]
  100.       AutoUrl:
  101.         type: string
  102.         description: url для скачки файла
  103.       NewFilename:
  104.         type: string
  105.         description: Новое наименование файла при скачке по url
  106.       AutoFtpServer:
  107.         type: string
  108.         description: фтп сервер
  109.       AutoFtpPort:
  110.         type: string
  111.         description: фтп порт
  112.       AutoFtpUser:
  113.         type: string
  114.         description: фтп login
  115.       AutoFtpPass:
  116.         type: string
  117.         description: фтп пароль
  118.       AutoFtpFile:
  119.         type: string
  120.         description: наименование файла который нужно забрать по фтп
  121.       Confirm:
  122.         type: boolean
  123.         description: Автозагрузка прайса через планировщик
  124.       Fromaddress:
  125.         type: string
  126.         description: адрес from для почтового сервера
  127.       ExactMatch:
  128.         type: string
  129.         description: прямое указание файла (будет игнорироваться рег.выражение)
  130.         enum: ['N','Y']
  131.       SubjectRule:
  132.         type: string
  133.         description: поиск по теме письма
  134.       PricefileRule:
  135.         type: string
  136.         description: правило поиска письма, можно использовать рег.выражения
  137.       Encoding:
  138.         type: string
  139.         description: кодировка файла
  140.       IntervalUpdate:
  141.         type: integer
  142.         description: период обновления в часах, 1 - 1 раз в час, 6 - 1 раз в 6 часов
  143.       Maildir:
  144.         type: string
  145.         description: каталог на сервере почты для поиска писем, по умолчанию Входящие
  146.       FileInArchive:
  147.         type: string
  148.         description: наименованеи файла в случае нахождения нескольких в архиве
  149.       PriceType:
  150.         type: string
  151.         description: тип конфигуратора прайса, P - прайсы N - номенклатура, C - кроссы
  152.         enum: ['P','N','C','PN','PNC','NC','PC']
  153.       DatafileId:
  154.         type: number
  155.         description: ID файла из бд автопрайса
  156.       DatalistLoadMode:
  157.         type: string
  158.         description: режим загрузки номенклатуры
  159.       UserId:
  160.         type: integer
  161.         description: ID клиента(пользователя серверисом)  
  162.       FileSize:
  163.         type: integer
  164.         description: Размер загруженного файла в байтах
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement