Skip to content

Commit

Permalink
Добавлена схема для функций. Исправлены опечатки.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiontik committed Dec 5, 2023
1 parent bd6a053 commit 2aca3a1
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/documentation/docs/manual/functions/example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ functions:
title: Объект конвертации
required: true # Признак обязательности параметра функции
# JSONSchema схема результата. Не обязательно.
result_:
result:
type: number
# Код функции
code: >
Expand Down
2 changes: 1 addition & 1 deletion public/documentation/docs/manual/functions/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ functions:
title: Объект конвертации
required: true # Признак обязательности параметра функции
# JSONSchema схема результата. Не обязательно.
result_:
result:
type: number
# Код функции
code: >
Expand Down
2 changes: 1 addition & 1 deletion public/metamodel/dochub/functions/tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ functions:
- type: object
title: Объект конвертации
# Схема результата
result_:
result:
type: string
# Код функции
code: >
Expand Down
26 changes: 26 additions & 0 deletions src/assets/master-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,34 @@ $defs:
$ref: "#/$defs/$res-uri-reference"
# Схема базовых сущностей
$entities:
functions:
type: object
additionalProperties: false
patternProperties:
"^[a-zA-Z0-9_]*(\\.[a-zA-Z0-9_]*)*$":
title: Идентификатор сущности
type: object
properties:
title:
type: string
title: Описание функции
params:
type: array
title: Параметры функции
items:
$ref: "#/$defs/$jsonschema"
code:
title: JSONata код функции
type: string
result:
title: Схема результата
$ref: "#/$defs/$jsonschema"
required:
- code

entities:
type: object
additionalProperties: false
patternProperties:
"^[0-9a-zA-Z][a-zA-Z0-9_-]*(\\.[a-zA-Z][a-zA-Z0-9_-]*)*$":
type: object
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ document.addEventListener('DOMContentLoaded', async() => {
store
}).$mount('#app');

window.$PAPI?.loaded();
window.$PAPI?.loaded && window.$PAPI.loaded();
});

0 comments on commit 2aca3a1

Please sign in to comment.