Class SystemTypeEnumReplacer

java.lang.Object
org.qubership.atp.ram.utils.SystemTypeEnumReplacer

@Component public class SystemTypeEnumReplacer extends Object
  • Constructor Details

    • SystemTypeEnumReplacer

      public SystemTypeEnumReplacer()
  • Method Details

    • patch

      @PostConstruct public void patch()
      Patches the string “wire values” of OpenAPI-generated inner enums (SystemTypeEnum) to ensure compatibility with external services.

      Background: OpenAPI enums in these DTOs keep a private, non-final value field that is used by @JsonCreator fromValue(...) and @JsonValue getValue(). This method replaces that field via reflection with the alias from the internal.system-type.alias property (e.g., INTERNAL_JIRA). After the patch, Jackson will both accept and emit the alias.