From 5e70ddbc75d5ede67b059ff2c1ca0b7dc1c4be90 Mon Sep 17 00:00:00 2001 From: Rushang Dhanesha Date: Tue, 5 Oct 2021 16:28:46 +0530 Subject: [PATCH 1/4] Renamed enum to Pascal_Case. --- .../fiscal-event-service-1.0.0.yaml | 2 +- .../java/org/egov/web/models/FiscalEvent.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/domain-services/fiscal-event-service/fiscal-event-service-1.0.0.yaml b/domain-services/fiscal-event-service/fiscal-event-service-1.0.0.yaml index baab626a..e3cac361 100644 --- a/domain-services/fiscal-event-service/fiscal-event-service-1.0.0.yaml +++ b/domain-services/fiscal-event-service/fiscal-event-service-1.0.0.yaml @@ -94,7 +94,7 @@ components: maxLength: 64 minLength: 1 type: string - description: Captures the event type (eg- SANCTION(B), APPROPRIATION(B), ALLOCATION(FIN-AD-BCO-DDO)(B), INTRA_TRANSFER (C), INTER_TRANSFER (C), DEMAND(A), RECEIPT (C), BILL(A),PAYMENT (C) + description: Captures the event type (eg- Sanction(B), Appropriation(B), Allocation(FIN-AD-BCO-DDO)(B), Intra_Transfer (C), Inter_Transfer (C), Demand(A), Receipt (C), Bill(A),Payment (C) nullable: false example: Appropriation eventTime: diff --git a/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java b/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java index 6f7a85b7..a2505f5b 100644 --- a/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java +++ b/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java @@ -64,15 +64,15 @@ public class FiscalEvent { public enum EventTypeEnum { - SANCTION("SANCTION"), - APPROPRIATION("APPROPRIATION"), - ALLOCATION("ALLOCATION"), - INTRA_TRANSFER("INTRA_TRANSFER"), - INTER_TRANSFER("INTER_TRANSFER"), - DEMAND("DEMAND"), - RECEIPT("RECEIPT"), - BILL("BILL"), - PAYMENT("PAYMENT"); + Sanction("Sanction"), + Appropriation("Appropriation"), + Allocation("Allocation"), + Intra_Transfer("Intra_Transfer"), + Inter_Transfer("Inter_Transfer"), + Demand("Demand"), + Receipt("Receipt"), + Bill("Bill"), + Payment("Payment"); private String value; From e4314c6b218ae6fe3304f615e49da7f5ae08b372 Mon Sep 17 00:00:00 2001 From: rushang7-eGov Date: Fri, 8 Oct 2021 12:24:22 +0530 Subject: [PATCH 2/4] API will receive enum in All Caps but within iFix-Core the enum will be in Pascal_Case. --- .../fiscal-event-service-1.0.0.yaml | 4 ++-- .../java/org/egov/web/models/FiscalEvent.java | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/domain-services/fiscal-event-service/fiscal-event-service-1.0.0.yaml b/domain-services/fiscal-event-service/fiscal-event-service-1.0.0.yaml index e3cac361..5abbd434 100644 --- a/domain-services/fiscal-event-service/fiscal-event-service-1.0.0.yaml +++ b/domain-services/fiscal-event-service/fiscal-event-service-1.0.0.yaml @@ -94,9 +94,9 @@ components: maxLength: 64 minLength: 1 type: string - description: Captures the event type (eg- Sanction(B), Appropriation(B), Allocation(FIN-AD-BCO-DDO)(B), Intra_Transfer (C), Inter_Transfer (C), Demand(A), Receipt (C), Bill(A),Payment (C) + description: Captures the event type (eg- SANCTION(B), APPROPRIATION(B), ALLOCATION(FIN-AD-BCO-DDO)(B), INTRA_TRANSFER(C), INTER_TRANSFER(C), DEMAND(A), RECEIPT(C), BILL(A), PAYMENT(C)) nullable: false - example: Appropriation + example: PAYMENT eventTime: type: integer description: when the event occured at source system level diff --git a/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java b/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java index a2505f5b..34ed3707 100644 --- a/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java +++ b/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java @@ -64,15 +64,15 @@ public class FiscalEvent { public enum EventTypeEnum { - Sanction("Sanction"), - Appropriation("Appropriation"), - Allocation("Allocation"), - Intra_Transfer("Intra_Transfer"), - Inter_Transfer("Inter_Transfer"), - Demand("Demand"), - Receipt("Receipt"), - Bill("Bill"), - Payment("Payment"); + Sanction("SANCTION"), + Appropriation("APPROPRIATION"), + Allocation("ALLOCATION"), + Intra_Transfer("INTRA_TRANSFER"), + Inter_Transfer("INTER_TRANSFER"), + Demand("DEMAND"), + Receipt("RECEIPT"), + Bill("BILL"), + Payment("PAYMENT"); private String value; From 516630450b70030cdca6aac1ddd63258261c872b Mon Sep 17 00:00:00 2001 From: rushang7-eGov Date: Fri, 8 Oct 2021 12:38:36 +0530 Subject: [PATCH 3/4] Fiscal-Event-Service will receive EventType enum in ALL_CAPS but it will output EventType enum in Pascal_Case. --- .../src/main/java/org/egov/web/models/FiscalEvent.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java b/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java index 34ed3707..39bbbd61 100644 --- a/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java +++ b/domain-services/fiscal-event-service/src/main/java/org/egov/web/models/FiscalEvent.java @@ -93,7 +93,7 @@ public static EventTypeEnum fromValue(String text) { @Override @JsonValue public String toString() { - return String.valueOf(value); + return name(); } } From 6de101bdce6ac9874aee0ff349fcd5cdeaa882af Mon Sep 17 00:00:00 2001 From: rushang7-eGov Date: Fri, 8 Oct 2021 12:45:51 +0530 Subject: [PATCH 4/4] Added note to CHANGELOG.md --- domain-services/fiscal-event-service/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/domain-services/fiscal-event-service/CHANGELOG.md b/domain-services/fiscal-event-service/CHANGELOG.md index 43928dc4..94c8763c 100644 --- a/domain-services/fiscal-event-service/CHANGELOG.md +++ b/domain-services/fiscal-event-service/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog All notable changes to this module will be documented in this file. +## 1.0.1 - 2021-10-08 +- Fiscal-Event-Service receives the EventType enum of FiscalEvent model in ALL_CAPS but it will process it in + Pascal_Case. The record in the kafka topic will get the enum in Pascal_Case. + ## 1.0.0 - 2021-09-24 - Baseline version released