Field-level @JsonIgnoreProperties is a serialization concern that should
not pollute global OpenAPI schemas. Strip it in mapAwareConverter before
ModelResolver sees it. Remove CalculatedField pre-registration as it
loses descriptions on $ref properties.
Pre-registering abstract intermediate types pulls in their full
inheritance chain (UUIDBased, HasUUID) as broken $ref entries.
Leave *Object schemas for these types as-is.
- Remove *Object duplicate schemas when base schema exists
- Pre-register CalculatedField, ContactBased, HasId to prevent
resolution-order issues with @JsonIgnoreProperties
- Deduplicate identical inline allOf entries
- Replace oneOf in additionalProperties.items with base type $ref
Springdoc creates duplicate schemas with an "Object" suffix when a
discriminated type is resolved through multiple paths. Remove identical
duplicates and replace inline oneOf in additionalProperties.items with
base type $ref for Map<K, List<PolymorphicType>> fields.
- Restore private on TEST_SCRIPT_EXPRESSION in CalculatedFieldController
- Restore @Valid on deprecated alarms field in DeviceProfileData
- Remove broken type guard in getTestScriptDialog (AlarmRuleDefinition
DTO has no type field, causing the dialog to never open)
RuleChainEntity and RuleChainDetailsEntity map to the same DB table.
When RuleChainDetailsEntity is loaded into the persistence context
(e.g. during isUpdateNeeded metadata comparison) and then the same row
is updated via RuleChainEntity (during saveRuleChain), the cached
RuleChainDetailsEntity becomes stale. Subsequent save via
RuleChainDetailsEntity fails with OptimisticLockException.
Fix: detach the entity immediately after loading in findById so it
does not linger in the persistence context.
Move test script execution logic from controllers to TbCalculatedFieldService,
eliminating the dependency of AlarmRuleController on CalculatedFieldController.
Simplify entity type filtering in getAlarmRules. Add AlarmRuleControllerTest
covering all endpoints.