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.37 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.     $ref: '#/definitions/Selfprice'
  73.     allOf:
  74.       - $ref: '#/definitions/Selfprice'
  75.       - type: object
  76.     properties:
  77.         Id:
  78.             type: integer
  79.             description: ключ
  80.   Selfprice:
  81.     type: object
  82.     description: конфигурация правила загрузки прайса
  83.     properties:
  84.       File:
  85.         type: string
  86.         description: наименование файла
  87.       PrvId:
  88.         type: integer
  89.         description: ID поставщика
  90.       Username:
  91.         type: string
  92.         description: имя пользователя создавшей запись
  93.       RequestState:
  94.         type: integer
  95.         description: состояние
  96.         default: 0
  97.       AutoType:
  98.         type: string
  99.         description: тип автоматической загрузки
  100.         enum: [none,url,ftp,mail]
  101.       AutoUrl:
  102.         type: string
  103.         description: url для скачки файла
  104.       NewFilename:
  105.         type: string
  106.         description: Новое наименование файла при скачке по url
  107.       AutoFtpServer:
  108.         type: string
  109.         description: фтп сервер
  110.       AutoFtpPort:
  111.         type: string
  112.         description: фтп порт
  113.       AutoFtpUser:
  114.         type: string
  115.         description: фтп login
  116.       AutoFtpPass:
  117.         type: string
  118.         description: фтп пароль
  119.       AutoFtpFile:
  120.         type: string
  121.         description: наименование файла который нужно забрать по фтп
  122.       Confirm:
  123.         type: boolean
  124.         description: Автозагрузка прайса через планировщик
  125.       Fromaddress:
  126.         type: string
  127.         description: адрес from для почтового сервера
  128.       ExactMatch:
  129.         type: string
  130.         description: прямое указание файла (будет игнорироваться рег.выражение)
  131.         enum: ['N','Y']
  132.       SubjectRule:
  133.         type: string
  134.         description: поиск по теме письма
  135.       PricefileRule:
  136.         type: string
  137.         description: правило поиска письма, можно использовать рег.выражения
  138.       Encoding:
  139.         type: string
  140.         description: кодировка файла
  141.       IntervalUpdate:
  142.         type: integer
  143.         description: период обновления в часах, 1 - 1 раз в час, 6 - 1 раз в 6 часов
  144.       Maildir:
  145.         type: string
  146.         description: каталог на сервере почты для поиска писем, по умолчанию Входящие
  147.       FileInArchive:
  148.         type: string
  149.         description: наименованеи файла в случае нахождения нескольких в архиве
  150.       PriceType:
  151.         type: string
  152.         description: тип конфигуратора прайса, P - прайсы N - номенклатура, C - кроссы
  153.         enum: ['P','N','C','PN','PNC','NC','PC']
  154.       DatafileId:
  155.         type: number
  156.         description: ID файла из бд автопрайса
  157.       DatalistLoadMode:
  158.         type: string
  159.         description: режим загрузки номенклатуры
  160.       UserId:
  161.         type: integer
  162.         description: ID клиента(пользователя серверисом)  
  163.       FileSize:
  164.         type: integer
  165.         description: Размер загруженного файла в байтах
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement