-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from RabotaRu/validators
Validators
- Loading branch information
Showing
62 changed files
with
10,740 additions
and
1,347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,38 @@ | ||
# URI в формате DocHub корневого манифеста (обязательно) | ||
VUE_APP_DOCHUB_ROOT_MANIFEST=gitlab:34:main@root.yaml | ||
# VUE_APP_DOCHUB_ROOT_MANIFEST=gitlab:34:main@root.yaml | ||
|
||
# Идентификатор документа главной страницы. По умолчанию dochub_welcome | ||
VUE_APP_DOCHUB_ROOT_DOCUMENT=dochub_welcome | ||
# VUE_APP_DOCHUB_ROOT_DOCUMENT=dochub_welcome | ||
|
||
# URL GitLab (необязательно) | ||
VUE_APP_DOCHUB_GITLAB_URL=https://foo.space | ||
# VUE_APP_DOCHUB_GITLAB_URL=https://foo.space | ||
|
||
# Персональный токен gitlab. Используется для локальной разработки | ||
VUE_APP_DOCHUB_PERSONAL_TOKEN=9H...FR | ||
# VUE_APP_DOCHUB_PERSONAL_TOKEN=9H...FR | ||
|
||
# Идентификатор приложения зарегистрированного в GitLab (обязательно, если есть VUE_APP_DOCHUB_GITLAB_URL) | ||
# https://docs.gitlab.com/ee/integration/oauth_provider.html | ||
VUE_APP_DOCHUB_APP_ID=5f3...f0 | ||
# VUE_APP_DOCHUB_APP_ID=5f3...f0 | ||
|
||
# Секрет приложения (обязательно, если есть VUE_APP_DOCHUB_GITLAB_URL) | ||
# https://docs.gitlab.com/ee/integration/oauth_provider.html | ||
VUE_APP_DOCHUB_CLIENT_SECRET=1e4...384 | ||
# VUE_APP_DOCHUB_CLIENT_SECRET=1e4...384 | ||
|
||
# Сервер рендеринга PlantUML (По умолчанию www.plantuml.com/plantuml/svg/) | ||
# При сборке через docker-compose по умолчанию localhost:8079/svg/ | ||
VUE_APP_PLANTUML_SERVER=localhost:8079/svg/ | ||
# VUE_APP_PLANTUML_SERVER=localhost:8079/svg/ | ||
|
||
# Больше информации о переменных среды выполнения | ||
# https://cli.vuejs.org/ru/guide/mode-and-env.html | ||
|
||
# Если "y" подключает в описание документацию DocHub | ||
VUE_APP_DOCHUB_APPEND_DOCHUB_DOCS= y / n | ||
# VUE_APP_DOCHUB_APPEND_DOCHUB_DOCS= y / n | ||
|
||
# Если "y" подключает контроль метамодели DocHub | ||
# VUE_APP_DOCHUB_APPEND_DOCHUB_METAMODEL= y / n | ||
|
||
# Если "plugin" сборка осуществляется для использования в IDEA плагине https://github.com/RabotaRu/DocHubIdeaPlugin | ||
#VUE_APP_DOCHUB_MODE=plugin | ||
# VUE_APP_DOCHUB_MODE=plugin | ||
|
||
# Определяет движок рендеринга (graphviz | smetana | elk). По умолчанию ELK | ||
# VUE_APP_DOCHUB_RENDER_CORE= ELK | ||
# VUE_APP_DOCHUB_RENDER_CORE=ELK |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ components: | |
dochub.web: | ||
title: WEB | ||
entity: component | ||
expert: R.Piontik | ||
technologies: | ||
- HTTP | ||
aspects: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
forms: | ||
entity: component | ||
fields: | ||
source_file: | ||
title: Файл | ||
required: true | ||
- entity: | ||
- component | ||
fields: | ||
source: | ||
title: Файл | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
rules: | ||
validators: | ||
dochub.fields: | ||
title: Заполнение полей # Название валидатора | ||
dochub.fields.experts: # Валидатор контролирует заполнение поля expert для компонентов L1 | ||
title: Не указаны эксперты для компонентов # Название валидатора | ||
source: > # Источник данных об ошибках. В данном случае JSONata запрос | ||
([([ | ||
components.$spread().( /* Сканируем все компоненты */ | ||
$ID := $keys()[0]; | ||
{ /* Генерируем массив признаков проблем */ | ||
"isComponent": *.entity = "component", /* Это компонент */ | ||
"isDocHubL1Domain": $boolean($match($ID, /dochub\.[^\.]*$/)), /* в домене DocHub L1 */ | ||
"isExpertEmpty": $not($boolean("" & *.expert)), /* и поле expert не заполнено */ | ||
"id": $ID | ||
} | ||
) | ||
][isDocHubL1Domain and isExpertEmpty and isComponent]).{ /* Отбираем все компоненты где поле 'expert' пустое*/ | ||
"uid": "expert-component-" & id, /* Уникальный идентификатор выявленной ошибки */ | ||
"location": "/architect/components/" & id, /* Ссылка на расположение объекта ошибки */ | ||
"correction": "Укажите эксперта по компоненту", /* Рекомендации как исправить проблему */ | ||
"description": "Компоненты L1 должены иметь сведения об экспертах." | ||
}]) | ||
dochub.fields.source: # Валидатор контролирует заполнение поля указывающего на исходник для домена DocHub | ||
title: Не указан файл исходного кода # Название валидатора | ||
source: > # Источник данных об ошибках. В данном случае JSONata запрос | ||
([([ | ||
components.$spread().( /* Сканируем все компоненты */ | ||
$ID := $keys()[0]; | ||
{ /* Генерируем массив признаков проблем */ | ||
"isComponent": *.entity = "component", /* Это компонент */ | ||
"isDocHubDomain": $boolean($match($ID, /dochub\.front.*/)), /* в домене DocHub */ | ||
"isSourceEmpty": $not($boolean("" & *.source)), /* и поле source не заполнено */ | ||
"id": $ID | ||
} | ||
) | ||
][isDocHubDomain and isSourceEmpty and isComponent]).{ /* Отбираем все компоненты где поле 'source' пустое*/ | ||
"uid": "source-component-" & id, /* Уникальный идентификатор выявленной ошибки */ | ||
"location": "/architect/components/" & id, /* Ссылка на расположение объекта ошибки */ | ||
"correction": "Укажите где расположен файл с исходными кодами", /* Рекомендации как исправить проблему */ | ||
"description": "Компоненты должены иметь сведения о файлах исходного кода в которых они реализуются. | ||
Если необходимо исключить для данного компонента эту информацию, | ||
укажите идентификатор ошибки в разделе 'exceptions' с описанием причиныsss | ||
", | ||
"isDocHubDomain":isDocHubDomain | ||
}]) | ||
exceptions: # Исключения для валидаторов | ||
"source-component-dochub.front.spa.blank.doc.markdown": # UID ошибки для исключения | ||
reason: > # Причина исключения | ||
Пример исключения для указания исходных кодов | ||
cause: /docs/dochub.exceptions.examples.doc_markdown # Документ-основание исключения | ||
"$dh-mm-ofb-dochub": | ||
reason: Корневой компонент может не входить в контекст |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.