feat(schema): Phase 1 schema templates + Nexus DevOps runbook
## AI Schema Assist Phase 1 (steps 1-2)
Approach A core (templates only, no LLM) — admin начинает создание нового
справочника с curated skeleton вместо пустого Monaco. Approach C (per-field
LLM suggest) — Phase 2 на этом фундаменте.
### Backend
- `templates/*.template.json` в ordinis-cuod-bundle resources — 6 шаблонов
(blank/spacecraft/ground-station/antenna/frequency-band/operator)
- `SchemaTemplateRegistry` (rest-api) — classpath scan at startup, strip
x-template-* metadata, expose canonical JSON Schema
- `SchemaTemplatesController` — GET /api/v1/dictionaries/templates (list)
+ /{id} (detail с schemaJson)
- Cross-bundle support: scanner matches classpath*:templates/*.template.json
— другие bundles могут shippит свои templates через те же conventions
### Frontend
- types: SchemaTemplateSummary + SchemaTemplateDetail
- queries: schemaTemplatesQuery + lazy detail query
- TemplatePicker.tsx — grid of cards (icon + name + description + tags),
click → fetch detail → fire onPick(detail)
- Integrated в DictionaryEditorDialog (create mode, properties.length===0
visible — после первой property picker исчезает чтобы не перезатереть)
## Nexus DevOps handoff
`docs-internal/ops/nexus-alpine-mirror.md` — runbook про APKINDEX vs file
inventory drift на v3.23 mirror. Includes:
- Verification commands
- 3 fix options (invalidate cache / scheduled refresh / self-host)
- Prometheus alert proposal
- Current workaround (node:22-alpine3.20 pin) reference
Active issue paired с CI saga !227/!229/!230 — нужен DevOps action.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$comment": "Template: antenna — minimal skeleton с FK на ground_station",
|
||||
"x-template-id": "antenna",
|
||||
"x-template-name": "Антенна",
|
||||
"x-template-description": "Скелет: код, имя, диаметр, FK на наземную станцию. Диапазоны и G/T добавь сам.",
|
||||
"x-template-icon": "WifiHighIcon",
|
||||
"x-template-tags": ["space", "hardware", "cuod"],
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"x-id-source": "code",
|
||||
"required": ["code", "name", "ground_station"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "Уникальный код антенны",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-unique": true
|
||||
},
|
||||
"name": {
|
||||
"type": "object",
|
||||
"x-localized": true,
|
||||
"description": "Наименование антенны",
|
||||
"patternProperties": {
|
||||
"^[a-z]{2}-[A-Z]{2}$": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"required": ["ru-RU"]
|
||||
},
|
||||
"diameter_m": {
|
||||
"type": "number",
|
||||
"description": "Диаметр зеркала, м",
|
||||
"minimum": 0
|
||||
},
|
||||
"ground_station": {
|
||||
"type": "string",
|
||||
"description": "FK на ground_station.code",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-references": "ground_station.code"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$comment": "Template: blank starter",
|
||||
"x-template-id": "blank",
|
||||
"x-template-name": "Пустой каркас",
|
||||
"x-template-description": "Только бизнес-ключ (code). Все остальные поля добавь сам.",
|
||||
"x-template-icon": "FileBlankIcon",
|
||||
"x-template-tags": ["empty", "starter"],
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"x-id-source": "code",
|
||||
"required": ["code"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "Бизнес-ключ",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-unique": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"$comment": "Template: frequency-band — min/max МГц + band code",
|
||||
"x-template-id": "frequency-band",
|
||||
"x-template-name": "Диапазон частот",
|
||||
"x-template-description": "Скелет: код, имя, нижняя/верхняя частота (МГц).",
|
||||
"x-template-icon": "WaveformIcon",
|
||||
"x-template-tags": ["radio", "cuod"],
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"x-id-source": "code",
|
||||
"required": ["code", "name", "min_mhz", "max_mhz"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "Код диапазона (e.g. L_BAND)",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-unique": true
|
||||
},
|
||||
"name": {
|
||||
"type": "object",
|
||||
"x-localized": true,
|
||||
"description": "Наименование",
|
||||
"patternProperties": {
|
||||
"^[a-z]{2}-[A-Z]{2}$": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"required": ["ru-RU"]
|
||||
},
|
||||
"min_mhz": {
|
||||
"type": "number",
|
||||
"description": "Нижняя частота, МГц",
|
||||
"minimum": 0
|
||||
},
|
||||
"max_mhz": {
|
||||
"type": "number",
|
||||
"description": "Верхняя частота, МГц",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"$comment": "Template: ground-station — minimal skeleton с lat/lon",
|
||||
"x-template-id": "ground-station",
|
||||
"x-template-name": "Наземная станция",
|
||||
"x-template-description": "Скелет: код, имя, координаты, страна. Антенны и оборудование добавь сам.",
|
||||
"x-template-icon": "BroadcastIcon",
|
||||
"x-template-tags": ["space", "ground", "cuod"],
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"x-id-source": "code",
|
||||
"required": ["code", "name", "lat", "lon"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "Уникальный код станции",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-unique": true
|
||||
},
|
||||
"name": {
|
||||
"type": "object",
|
||||
"x-localized": true,
|
||||
"description": "Наименование станции",
|
||||
"patternProperties": {
|
||||
"^[a-z]{2}-[A-Z]{2}$": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"required": ["ru-RU"]
|
||||
},
|
||||
"lat": {
|
||||
"type": "number",
|
||||
"description": "Широта (°)",
|
||||
"minimum": -90,
|
||||
"maximum": 90
|
||||
},
|
||||
"lon": {
|
||||
"type": "number",
|
||||
"description": "Долгота (°)",
|
||||
"minimum": -180,
|
||||
"maximum": 180
|
||||
},
|
||||
"country": {
|
||||
"type": "string",
|
||||
"description": "ISO 3166-1 alpha-2 страны размещения",
|
||||
"pattern": "^[A-Z]{2}$"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"$comment": "Template: operator (оператор КА / земсегмента)",
|
||||
"x-template-id": "operator",
|
||||
"x-template-name": "Оператор",
|
||||
"x-template-description": "Скелет: код, имя, страна, контакт. Лицензии и контракты добавь сам.",
|
||||
"x-template-icon": "BuildingsIcon",
|
||||
"x-template-tags": ["org", "cuod"],
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"x-id-source": "code",
|
||||
"required": ["code", "name", "country"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "Уникальный код оператора",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-unique": true
|
||||
},
|
||||
"name": {
|
||||
"type": "object",
|
||||
"x-localized": true,
|
||||
"description": "Наименование оператора",
|
||||
"patternProperties": {
|
||||
"^[a-z]{2}-[A-Z]{2}$": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"required": ["ru-RU"]
|
||||
},
|
||||
"country": {
|
||||
"type": "string",
|
||||
"description": "ISO 3166-1 alpha-2 страны",
|
||||
"pattern": "^[A-Z]{2}$"
|
||||
},
|
||||
"contact_email": {
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"description": "Контактный email"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"$comment": "Template: spacecraft (ЦУОД) — minimal skeleton",
|
||||
"x-template-id": "spacecraft",
|
||||
"x-template-name": "Космический аппарат",
|
||||
"x-template-description": "Скелет для справочника КА: код, имя, тип, страна. Орбиту/мaccу/спектр добавь сам.",
|
||||
"x-template-icon": "SatelliteIcon",
|
||||
"x-template-tags": ["space", "cuod"],
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"type": "object",
|
||||
"x-id-source": "code",
|
||||
"required": ["code", "name"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"description": "Уникальный код КА",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-unique": true
|
||||
},
|
||||
"name": {
|
||||
"type": "object",
|
||||
"x-localized": true,
|
||||
"description": "Наименование КА",
|
||||
"patternProperties": {
|
||||
"^[a-z]{2}-[A-Z]{2}$": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"required": ["ru-RU"]
|
||||
},
|
||||
"satellite_type_code": {
|
||||
"type": "string",
|
||||
"description": "Тип КА (FK на satellite_type)",
|
||||
"pattern": "^[A-Z][A-Z0-9_]{1,31}$",
|
||||
"x-references": "satellite_type.code"
|
||||
},
|
||||
"country": {
|
||||
"type": "string",
|
||||
"description": "ISO 3166-1 alpha-2 страны-оператора",
|
||||
"pattern": "^[A-Z]{2}$"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user