Skip to content

Commit

Permalink
Merge pull request #358 from RabotaRu/v3.1.1
Browse files Browse the repository at this point in the history
v3.1.1
  • Loading branch information
rpiontik committed Aug 14, 2023
2 parents e1d5536 + 9d62aa4 commit f72df74
Show file tree
Hide file tree
Showing 15 changed files with 569 additions and 256 deletions.
Binary file not shown.
10 changes: 5 additions & 5 deletions public/documentation/docs/manual/entities/entities.md
Expand Up @@ -542,7 +542,7 @@ entities:
Формат подключения схемы:

```
#/$rels/<Идентификатор сущности>/<Тип поставляемого объекта>
#/$rels/<Идентификатор сущности>.<Тип поставляемого объекта>
```

Допустим, необходимо, чтобы поля "from" и "to" заполнялись идентификаторами компонентов.
Expand All @@ -553,10 +553,10 @@ entities:
properties:
from:
title: От кого
$ref: "#/$rels/components/component"
$ref: "#/$rels/components.component"
to:
title: Кому
$ref: "#/$rels/components/component"
$ref: "#/$rels/components.component"
...
```

Expand Down Expand Up @@ -601,7 +601,7 @@ IDE будет подсвечивать неверные.
& 'L 19.855469 24 C 19.40625 22.285156 17.851563 21 16 21 C 14.148438 21 12.59375 22.285156 12.144531 24 L 8 24 L 8 20 L 11 '
& '20 L 11 12 L 8 12 Z M 5 14 L 9 14 L 9 18 L 5 18 Z M 23 14 L 27 14 L 27 18 L 23 18 Z M 16 23 C 17.117188 23 18 23.882813 '
& '18 25 C 18 26.117188 17.117188 27 16 27 C 14.882813 27 14 26.117188 14 25 C 14 23.882813 14.882813 23 16 23 Z"/>'
& '</svg>''
& '</svg>'
)
...
```
Expand Down Expand Up @@ -632,7 +632,7 @@ IDE будет подсвечивать неверные.
minLength: 1
sub-interactions: # Добавляем поле, в котором можно указать ссылку на вложенное взаимодействие
title: Вложенное взаимодействие
$ref: "#/$rels/interactions/interaction"
$ref: "#/$rels/interactions.interaction"
required:
- from
- to
Expand Down
2 changes: 1 addition & 1 deletion public/documentation/entities/interactions/entity.yaml
Expand Up @@ -237,7 +237,7 @@ entities: # Сущности расширенной матемодели
& 'L 19.855469 24 C 19.40625 22.285156 17.851563 21 16 21 C 14.148438 21 12.59375 22.285156 12.144531 24 L 8 24 L 8 20 L 11 '
& '20 L 11 12 L 8 12 Z M 5 14 L 9 14 L 9 18 L 5 18 Z M 23 14 L 27 14 L 27 18 L 23 18 Z M 16 23 C 17.117188 23 18 23.882813 '
& '18 25 C 18 26.117188 17.117188 27 16 27 C 14.882813 27 14 26.117188 14 25 C 14 23.882813 14.882813 23 16 23 Z"/>'
& '</svg>''
& '</svg>'
)
# Использование сущности расширенной метамодели
Expand Down
86 changes: 2 additions & 84 deletions public/metamodel/dochub.yaml
@@ -1,87 +1,5 @@
imports:
# - http://localhost:8080/metamodel/root.yaml
- http://localhost:8080/documentation/root.yaml
# - http://localhost:8080/documentation/root.yaml
# - https://dochub.info/documentation/root.yaml
# - root.yaml

entities:
nodes:
title: Пример сущности декларирующей свои объекты
schema:
type: object
patternProperties:
"^[0-9a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z][a-zA-Z0-9_-]*)*$":
type: object
properties:
title:
title: Название объекта
type: string
objects: # Декларируемые объекты
node:
route: "/" # Размещение массива объектов от корня "entities"
title: Нода

examples:
title: Пример ссылок на объекты сущности node
schema:
type: array
items:
type: object
properties:
node:
title: Здесь указывается ID ноды
$ref: "#/$rels/components.component" # Ссылка на объект сущности nodes
required:
- node

nodes:
test:
title: sdjsjhgd
test2:
title: ksjkjhdkhjsdkjhsd

interactions:
dochub.customer:
title: Пользователь
dochub.customer.promotion:
title: Продвижение
customer.promotion.article:
title: Статья на Хабре
triggers:
- Выдача в поиске
results:
- Переход в репозиторий
steps:
- from: Хабр
to: Клиент
value: Анализ новых статей
- from: Клиент
to: Хабр
value: Чтение статьи о DocHub
- from: Клиент
to: Репозиторий
value: Переход в репозиторий

customer.deployment:
title: Разворачивание DocHub
triggers:
- Первое знакомство с DocHub
results:
- Потенциальный клиент (лид)
steps:
- from: Клиент
to: Статьи
value: Получение информации о DocHub
sub-interactions: customer.promotion.article # Здесь ссылка на взаимодействие пользователя со статьями
- from: Клиент
to: Репозиторий
value: Изучение инструкции
- from: Клиент
to: Репозиторий
value: Развертывание
- from: Клиент
to: DocHub
value: Первый опыт

examples:
- node: dochub.front.spa.blank.radar
# - root.yaml
1 change: 0 additions & 1 deletion public/metamodel/dochub/entities/contexts/base.yaml
Expand Up @@ -71,7 +71,6 @@ entities:
pattern: "\\s*\\((.|\\s)*\\)\\s*"
required:
- title
- components
additionalProperties: false
menu: >
(
Expand Down
16 changes: 11 additions & 5 deletions public/metamodel/dochub/entities/contexts/plantuml.yaml
Expand Up @@ -64,7 +64,7 @@ entities:
"$EntityAspect(\""
& $entity
& "\",\"[[/architect/aspects/"
& $
& $encodeUrlComponent($)
& " "
& $title
& "]]\")\n"
Expand Down Expand Up @@ -165,24 +165,30 @@ entities:
$defFunctions := $manifest.entities.contexts.api;
/* Получаем коллекцию дефолтных параметров */
$defConfig := $manifest.entities.contexts.config;
$defConfig := $manifest.entities.contexts.config;
/* Получаем параметры из контекста */
$customConfig := $context.config;
/* Формируем итоговый конфиг */
$config := $mergedeep([$defConfig,$customConfig]);
/* Определяем движок рендеринга */
$renderCore := $lookup({
"elk": "!pragma layout elk",
"smetana": "!pragma layout smetana"
}, $defConfig.renderCore);
}, $config.renderCore);
/* Формируем заголовок */
$header := "$Header(\"" & ($context.title ? $context.title : $id ) & "\", \"" & $context.uml."$autor" & "\", \"" & $context.uml."$version" & "\" , \"" & $context.uml."$moment" & "\")\n";
/* Получаем все компоненты входящие в контекст */
$components := $eval($defFunctions.fetchComponents, {
$components := $eval($defFunctions.fetchComponents, $merge([$params, {
"manifest": $manifest,
"contextId": $id,
"extra-links": $isExtraLinks,
"componentId": $params.componentId
});
}]));
/* Генерируем области */
$areas := $eval($defFunctions.fetchAreas, {
Expand Down

0 comments on commit f72df74

Please sign in to comment.