Package org.qubership.atp.ram.utils
Class SystemTypeEnumReplacer
java.lang.Object
org.qubership.atp.ram.utils.SystemTypeEnumReplacer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidpatch()Patches the string “wire values” of OpenAPI-generated inner enums (SystemTypeEnum) to ensure compatibility with external services.
-
Constructor Details
-
SystemTypeEnumReplacer
public SystemTypeEnumReplacer()
-
-
Method Details
-
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
valuefield that is used by@JsonCreator fromValue(...)and@JsonValue getValue(). This method replaces that field via reflection with the alias from theinternal.system-type.aliasproperty (e.g.,INTERNAL_JIRA). After the patch, Jackson will both accept and emit the alias.
-