Skip to content

Instantly share code, notes, and snippets.

@webnitros
Created May 10, 2023 09:25
Show Gist options
  • Save webnitros/483d37e595d7580b6b9f09d59b8457b9 to your computer and use it in GitHub Desktop.
Save webnitros/483d37e595d7580b6b9f09d59b8457b9 to your computer and use it in GitHub Desktop.
openapi: 3.0.0
info:
title: Pandora
description: "## Введение\n\n Шина данных компания Технолайт.\n\n- [GitHub](https://github.com/webnitros/databus)\n"
version: 1.0.0
servers:
-
url: 'http://localhost'
description: 'Local API server'
paths:
/api/articles:
post:
tags:
- Товары
summary: articles
description: 'Получить список артикулов'
operationId: ArticleRequestController.me
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/ArticleRequestResource'
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/ArticleResource'
/api/articles/check:
post:
tags:
- Товары
summary: articles/check
description: 'Вернет список сайтов, на которых есть рарешение Выгружать на сайт'
operationId: SiteArticleRequestController.me
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/SiteArticleRequestResource'
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/SiteArticleResource'
/api/products:
post:
tags:
- Товары
summary: products
description: 'Получить список товаров'
operationId: ProductRequestController.me
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/ProductRequestResource'
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/ProductResource'
/api/property_reference:
get:
tags:
- Товары
summary: property_reference
description: 'Список свойств из 1с'
operationId: PropertyReferenceRequestController.me
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/PropertyReferenceResource'
/api/sites:
get:
tags:
- Сайты
summary: sites
description: 'Получить список сайтов'
operationId: SiteRequestController.me
responses:
'200':
description: Ok
content:
application/json:
schema:
$ref: '#/components/schemas/SiteResource'
components:
schemas:
ValidationError:
properties:
message:
type: string
example: 'The given data was invalid.'
errors:
properties:
'key 1':
type: array
items:
type: string
example: 'Error message 1'
'key 2':
type: array
items:
type: string
example: 'Error message 2'
type: object
type: object
AdminLoginRequest:
required:
- email
- password
properties:
email:
type: string
format: email
example: [email protected]
password:
type: string
example: '123456'
type: object
LoginRequest:
required:
- email
- password
properties:
email:
type: string
format: email
example: [email protected]
password:
type: string
example: '123456'
type: object
SignupRequest:
required:
- name
- email
- password
- password_confirmation
properties:
name:
type: string
example: 'John Doe'
email:
type: string
format: email
example: [email protected]
password:
type: string
example: '123456'
password_confirmation:
type: string
example: '123456'
type: object
ArticleRequestResource:
properties:
limit:
description: 'По умолчанию 10'
type: integer
example: 10
type: object
ArticleResource:
properties:
id:
description: 'внутрений индитификатор в шине данных для обмена'
type: integer
example: 1
article:
description: 'Артикул 1c, в верхнем регистре'
type: string
example: A6509SP-3CC
original:
description: 'Оригинальный артикул'
type: string
example: A6509SP-3CC
active:
description: Включен
type: boolean
example: true
created_at:
description: 'Дата создания'
type: string
format: date
example: '2023-05-06T15:56:48.000000Z'
updated_at:
description: 'Дата обновления'
type: string
format: date
example: '2023-05-06T15:56:48.000000Z'
type: object
ProductRequestResource:
properties:
domain:
description: 'Домен для которого нужно отдать список товаров'
type: string
example: fandeco.ru
article:
description: 'Список artikul_1c'
type: json
example:
- A6509SP-3CC
- A1992SP-1PB
- '7565/02 SP-7'
article_id:
description: 'Список article_id из метода articles'
type: json
example:
- 4323
- 41555
- 99
product_id:
description: 'Список product_id'
type: json
example:
- 4323
- 41555
- 99
limit:
description: 'По умолчанию 10'
type: integer
example: 10
type: object
ProductResource:
properties:
id:
description: 'внутрений индитификатор в шине данных для обмена'
type: integer
example: 1
article_id:
description: 'Индитификатор артикула в 1с'
type: integer
example: 1
artikul_1c:
description: 'Артикул для синхронизации с 1с'
type: string
example: A2521PL-5WH
show_artikul:
description: 'Артикул поставщика'
type: string
example: A2521PL-5WH
weight:
description: 'Вес (кг)'
type: decimal
example: 0.69
barcode:
description: Штрихкод
type: string
example: '4690344016988'
description:
description: Описание
type: text
example: 'Светильник Sonex 008 серии Vuale. Будет хорошим решением для квартиры. Размеры 30x16x0 cm. Параметры пылевлагозащиты IP — 20. Форма полукруглая. Плафон стеклянный белого цвета, а материал/цвет арматуры металл/бронза. Использует 1 лампу с цоколем E27. Площадь освещения охватывает 8 m². Идеально подходит для гостиной, для офиса, для спальни, для прихожей, для кухни. Страна происхождения бренда — Россия.'
alias_tl:
description: 'Алиас серии technolight.ru'
type: string
example: ''
description_from_1c:
description: 'Брать описание товара из 1С'
type: boolean
example: false
vendor_code:
description: Бренд
type: string
example: Sonex
weight_netto:
description: 'Вес нетто кг'
type: decimal
example: 0.66
vid_vyklyuchatelya:
description: 'Вид выключателя_web'
type: json
example: []
sub_category:
description: 'Вид светильника Интернет'
type: string
example: 'Настенные светильники'
input_voltage_v:
description: 'Входное напряжение V'
type: string
example: ''
input_signal:
description: 'Входной сигнал'
type: string
example: ''
submit_to_config_arte:
description: 'Выгружать в конфигуратор треков ArteLamp'
type: boolean
example: false
submit_to_config_technolight:
description: 'Выгружать в конфигуратор треков Technolight'
type: boolean
example: false
submit_to_artelamp_it:
description: 'Выгружать на сайт Artelamp.it'
type: boolean
example: false
submit_to_divinare_it:
description: 'Выгружать на сайт Divinare.it'
type: boolean
example: false
submit_to_site:
description: 'Выгружать на сайт Fandeco'
type: boolean
example: true
submit_to_technolight:
description: 'Выгружать на сайт technolight.ru'
type: boolean
example: false
height_in_assembly:
description: 'Высота в сборке мм'
type: decimal
example: 0
box_height:
description: 'Высота коробки см'
type: decimal
example: 12.5
vysota_plafona_abazhura_sm:
description: 'Высота плафона см_web'
type: decimal
example: 0
height:
description: 'Высота светильника см'
type: decimal
example: 0
output_power_w:
description: 'Выходная мощность W'
type: string
example: ''
output_voltage_v:
description: 'Выходное напряжение V'
type: decimal
example: 0
output_signal:
description: 'Выходной сигнал'
type: string
example: ''
output_current_a:
description: 'Выходной ток A'
type: string
example: ''
output_channels:
description: 'Выходные каналы'
type: string
example: ''
garantiya:
description: 'Гарантийный срок мес'
type: integer
example: 0
depth_vrezki:
description: 'Глубина врезного отверстия см'
type: decimal
example: 0
diametr_vrezki:
description: 'Диаметр врезного отверстия см'
type: decimal
example: 0
diametr_plafona_sm:
description: 'Диаметр плафона см_web'
type: decimal
example: 0
diameter:
description: 'Диаметр светильника см'
type: decimal
example: 127
dimmer:
description: Диммер_web
type: boolean
example: false
adapter_length_per_track:
description: 'Длина адаптера в треке'
type: integer
example: 0
dlina_vrezki:
description: 'Длина врезного отверстия см_web'
type: decimal
example: 0
box_length:
description: 'Длина коробки см'
type: decimal
example: 36
track_length:
description: 'Длина на треке, мм'
type: integer
example: 0
length:
description: 'Длина светильника см'
type: decimal
example: 30
length_shnura:
description: 'Длина цепи или шнура см'
type: decimal
example: 0
dopolnitelno:
description: Дополнительно_web
type: json
example: []
permissible_quantity_per_circuit_breaker_b16:
description: 'Допустимое кол-во на автомат защиты B16'
type: decimal
example: 0
permissible_quantity_per_circuit_breaker_c16:
description: 'Допустимое кол-во на автомат защиты C16'
type: decimal
example: 0
restrict_sale_online:
description: 'Запрет продажи онлайн'
type: string
example: ''
control_zones:
description: 'Зоны управления'
type: integer
example: 0
color_rendering_index:
description: 'Индекс цветопередачи'
type: string
example: ''
interer:
description: Интерьер_web
type: json
example:
- 'Для гостиной'
- 'Для офиса'
- 'Для спальни'
- 'Для прихожей'
- 'Для кухни'
noise_level:
description: 'Использование с устройствами ШИМ'
type: string
example: ''
technical_cat:
description: 'Категория технического света'
type: string
example: ''
class1:
description: 'КЛАСС I ВИД'
type: string
example: Бра
class2:
description: 'КЛАСС II ГРУППА ТИП'
type: string
example: 'Светильники настенные'
class3:
description: 'КЛАСС III ПОДГРУППА СТИЛЬ'
type: string
example: ''
class4:
description: 'КЛАСС IV ТИП ИСТОЧНИКА СВЕТА'
type: string
example: Накаливания
num_of_socket:
description: 'Количество патронов'
type: integer
example: 1
num_of_socket2:
description: 'Количество патронов 2'
type: integer
example: 0
collection:
description: Коллекция
type: string
example: VUALE
collection_web:
description: Коллекция_web
type: string
example: ''
box_count:
description: 'Комплект коробок'
type: integer
example: 0
komplektaciya:
description: Комплектация_web
type: json
example: []
coefficient_power:
description: 'Коэффициент мощности'
type: decimal
example: 0
lamp_included:
description: 'Лампа в комплекте'
type: boolean
example: false
vysota_max_sm:
description: 'Максимальная высота см_web'
type: decimal
example: 0
armature_material:
description: 'Материал арматуры_web'
type: json
example:
- Металл
housing_material:
description: 'Материал корпуса'
type: json
example: []
plafond_material:
description: 'Материал плафона/декора_web'
type: json
example:
- Стекло
fabric_material:
description: 'Материал ткани_web'
type: json
example: []
mesto_montaza:
description: 'Место монтажа_web'
type: json
example:
- 'На стену'
mesto_prim:
description: 'Место применения_web'
type: json
example:
- 'В квартиру'
- 'В комнату'
vysota_min_sm:
description: 'Минимальная высота см_web'
type: decimal
example: 0
power:
description: 'Мощность W'
type: integer
example: 100
power2:
description: 'Мощность W 2'
type: integer
example: 0
power3:
description: 'Мощность W 3'
type: integer
example: 0
power_w_m:
description: 'Мощность W/m'
type: decimal
example: 0
destination:
description: Назначение
type: string
example: ''
title:
description: 'Наименование для сайта'
type: string
example: 'Настенный светильник Sonex VUALE 008'
shade_direction:
description: 'Направление плафона_web'
type: json
example: []
napravlennyy_svet:
description: 'Направленный свет_web'
type: boolean
example: false
voltage:
description: 'Напряжение V'
type: integer
example: 220
new:
description: Новинка
type: boolean
example: false
sertnumber:
description: 'Номер сертификата'
type: string
example: ''
plafon_share:
description: 'Общий плафон_web'
type: string
example: Да
osobennost:
description: Особенность_web
type: json
example:
- Декоративный
ottenok:
description: Оттенок_web
type: json
example:
- Светлый
lamp_socket:
description: Патрон
type: json
example:
- E27
lamp_socket2:
description: 'Патрон 2'
type: json
example: []
lamp_socket3:
description: 'Патрон 3'
type: json
example: []
led_density:
description: 'Плотность светодиодов'
type: decimal
example: 0
ploshad_osvesheniya:
description: 'Площадь освещения_web'
type: decimal
example: 8
technical_subcat:
description: 'Подкатегория технического света'
type: string
example: ''
current_consumption_a:
description: 'Потребляемый ток A'
type: string
example: ''
limit_input_voltage_v:
description: 'Предельное входное напряжение V'
type: string
example: ''
manufature:
description: Производство
type: boolean
example: false
pult:
description: 'Пульт дистанционного управления'
type: boolean
example: false
starting_current_a:
description: 'Пусковой ток A'
type: string
example: ''
working_temperature:
description: 'Рабочая температура'
type: string
example: ''
dissipated_max_power_w_m:
description: 'Рассеиваемая макс.мощность W/m'
type: decimal
example: 0
diffuser:
description: Рассеиватель_web
type: json
example: []
brightness_control:
description: 'Регулировка яркости_technolight'
type: string
example: ''
candle_lamp:
description: 'Светильник свечка_web'
type: string
example: ''
light_flow:
description: 'Световой поток Lm'
type: integer
example: 1600
light_transmission:
description: 'Светопропускание %'
type: integer
example: 0
console_panel_properties:
description: 'Свойства пульта/панели'
type: string
example: ''
mounting_method:
description: 'Способ монтажа'
type: string
example: ''
life_time:
description: 'Срок службы ч'
type: integer
example: 0
video_link:
description: 'Ссылка на youtube'
type: json
example: []
status_nomenklatury:
description: 'Статус номенклатуры'
type: json
example: []
ip_class:
description: 'Степень пыле-влагозащищенности IP'
type: integer
example: 20
lamp_style:
description: 'Стиль светильника_web'
type: json
example:
- Прованс
country:
description: 'Страна производства'
type: string
example: КИТАЙ
country_orig:
description: 'Страна происхождения бренда_web'
type: string
example: РОССИЯ
sub_lin_razm:
description: 'Субъективные линейные размеры_web'
type: string
example: ''
sub_oc_razm:
description: 'Субъективные размеры_web'
type: string
example: Большой
block_type:
description: 'Тип блока'
type: string
example: ''
sensor_type:
description: 'Тип датчика'
type: string
example: ''
type_flask:
description: 'Тип колбы_web'
type: string
example: ''
frame_type:
description: 'Тип корпуса'
type: string
example: ''
krepej:
description: 'Тип крепления_web'
type: json
example:
- Накладной
lamp_type2:
description: 'Тип лампы 2_web'
type: json
example: []
lamp_type3:
description: 'Тип лампы 3_web'
type: json
example: []
lamp_type:
description: 'Тип лампы_web'
type: json
example:
- Светодиодная
type_of_tape_accessories:
description: 'Тип ленты/комплектующих'
type: string
example: ''
tip_poverhnosti_plafonov_new:
description: 'Тип поверхности плафона_web'
type: json
example:
- Матовая
tip_podklyucheniya_new:
description: 'Тип подключения_web'
type: json
example: []
profile_type:
description: 'Тип профиля/комплектующих'
type: string
example: ''
category:
description: 'Тип светильника'
type: string
example: Светильники
led_type:
description: 'Тип светодиодов'
type: string
example: ''
product_type_for_light_control:
description: 'Тип товара для управления'
type: string
example: ''
good_type_web:
description: 'Тип товара Интернет'
type: string
example: 'Настенные светильники и бра'
tip_upravleniya:
description: 'Тип управления_web'
type: json
example: []
type_of_instalation:
description: 'Тип установки'
type: string
example: ''
product_disabled:
description: 'Товар больше не используется'
type: boolean
example: false
current_a:
description: 'Ток А'
type: decimal
example: 0
load_current:
description: 'Ток нагрузки A'
type: string
example: ''
scattering_angle:
description: 'Угол рассеивания'
type: decimal
example: 0
light_angle:
description: 'Угол рассеивания градусы'
type: integer
example: 0
form:
description: Форма
type: string
example: ''
forma_plafona:
description: 'Форма плафона_web'
type: json
example:
- Полукруг
forma:
description: 'Форма товара общая_web'
type: json
example:
- Полукруг
hashtag:
description: Хештег_web
type: json
example: []
armature_color:
description: 'Цвет арматуры_web'
type: json
example:
- Бронза
plafond_color:
description: 'Цвет плафона/декора_web'
type: json
example:
- Белый
color:
description: 'Цвет товара общий_web'
type: json
example:
- Белый
light_temperatures2:
description: 'Цветовая температура 2 К'
type: json
example: []
light_temperatures3:
description: 'Цветовая температура 3 К'
type: json
example: []
light_temperatures:
description: 'Цветовая температура К'
type: json
example: []
tsvet_temp:
description: 'Цветовая температура К_web'
type: json
example: []
baud_rate:
description: 'Частота передачи данных MHz'
type: decimal
example: 0
pwm_frequency:
description: 'Частота ШИМ Hz'
type: integer
example: 0
shirina_vrezki:
description: 'Ширина врезного отверстия см_web'
type: decimal
example: 0
box_width:
description: 'Ширина коробки см'
type: decimal
example: 18.5
width_for_led_strip_c:
description: 'Ширина площадки под ленту Cм'
type: decimal
example: 0
width:
description: 'Ширина светильника см'
type: decimal
example: 16
light_line_width_c:
description: 'Ширина световой линии См'
type: decimal
example: 0
seo_title:
description: 'Сгенерированный заголовок'
type: string
example: 0
seo_description:
description: 'Сгенерированное описание'
type: string
example: 0
seo_keywords:
description: 'Сгенерированные ключевые слова'
type: string
example: 0
seo_content:
description: 'Сгенерированный контент'
type: string
example: 0
type: object
PropertyReferenceResource:
properties:
id:
description: 'внутрений индитификатор в шине данных для обмена'
type: integer
example: 1
name:
description: 'Наименование из 1с'
type: string
example: 'Цвет арматуры'
type:
description: ''
type: string
enum:
- string
- integer
- boolean
- decimal
- array
example: string
uuid:
description: 'Уникальный индитификатор из 1с'
type: string
example: fa7ba7bf-15cc-11ea-816c-005056a9741d
field:
description: 'Название поля в таблице на сайте'
type: string
example: show_artikul
trigger_track:
description: '1с отсылает триггер'
type: boolean
example: true
update_product:
description: ''
type: boolean
example: true
type: object
SiteResource:
properties:
id:
description: 'внутрений индитификатор в шине данных для обмена'
type: integer
example: 1
domain:
description: 'Артикул 1c, в верхнем регистре'
type: string
example: A6509SP-3CC
prefix_submit_to_site:
description: 'Префикс для получиния данных из 1с'
type: string
example: A6509SP-3CC
active:
description: 'Включен для обмена'
type: boolean
example: true
alias:
description: 'Внутрений алиас'
type: string
example: divinare_kz
type: object
SiteArticleRequestResource:
properties:
article:
description: 'Артикул для проверки'
required:
- article
type: string
example: A6509SP-3CC
type: object
SiteArticleResource:
properties:
fandeco.ru:
description: ''
type: boolean
example: true
artelamp.ru:
description: ''
type: boolean
example: true
divinare.ru:
description: ''
type: boolean
example: true
divinare.kz:
description: ''
type: boolean
example: false
type: object
securitySchemes:
BearerToken:
type: http
bearerFormat: JWT
scheme: bearer
tags:
-
name: Товары
description: 'Товары и их характеристики'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment