Zimin A.N.
|
ae69a7642b
|
feat(cuod-bundle): JSON Schema драфты для spacecraft/satellite_type/ground_station + auto-import
3 schema драфта в classpath:/bundles/cuod/:
- spacecraft.schema.json: КА с COSPAR designator, NORAD ID, multi-locale
name/operator/mission, orbit params (type/semimajor/eccentricity/inclination/
raan/aop/epoch), spectrum_bands (12 bands), launch/decay dates, status enum
- satellite_type.schema.json: классификация КА — code, multi-locale name/desc,
mission_category enum (10 categories), mass_class, typical_orbit_classes,
typical_resolution_m, typical_revisit_hours
- ground_station.schema.json: code, multi-locale name/location/operator,
country (ISO 3166), lat/lon/elevation, antennas array (id, diameter,
bands, polarizations, tx/rx_capable, G/T, EIRP), status
manifest.json: bundle 'cuod' v1.0.0, 3 dictionaries с supported_locales
[ru-RU, en-US] default ru-RU, scope PUBLIC
ordinis-cuod-bundle модуль:
- BundleManifest record + DictionaryEntry record (Jackson deserializer)
- CuodBundleProperties @ConfigurationProperties (auto-import flag,
update-existing-schema flag, resource-root path)
- CuodBundleImporter @Service (proxified, @Transactional работает) — читает
manifest + schemas, для каждого: findByName → если нет, создать definition
+ outbox event DefinitionCreated; если есть, проверить schema_version, при
отличии и update_existing_schema=true — обновить + DefinitionUpdated outbox
- CuodBundleStartupRunner @Configuration с ApplicationRunner — триггерит
importBundle при старте Spring Boot. Отделено от Importer чтобы Importer
оставался proxified (@Transactional на importBundle vs lambda не работает)
ordinis-validation FIX:
- RecordValidator теперь учитывает required array родительской схемы.
Отсутствие x-localized optional поля (например mission, operator) больше
не считается ошибкой. Required x-localized поля по-прежнему обязательны.
E2E проверено:
- ORDINIS_BUNDLE_CUOD_AUTO_IMPORT=true → 3 справочника создались с правильными
scope, locales, schema_version
- POST spacecraft с реальными Kanopus-V данными (orbit + spectrum_bands) → 201
- POST satellite_type с code='lower-case-bad' → 422 pattern error
- Idempotent: повторный старт пропускает existing без ошибок
|
2026-05-03 14:29:43 +03:00 |
|