From 4e779f240549a3713031072293b364730db3ba6d Mon Sep 17 00:00:00 2001 From: Keyur Doshi Date: Tue, 11 Nov 2025 14:48:26 +0530 Subject: [PATCH] request and response matched with spec --- openapi-spec/crapi-openapi-spec.json | 24 ++------ .../src/resources/crapi-openapi-spec.json | 56 +++---------------- 2 files changed, 12 insertions(+), 68 deletions(-) diff --git a/openapi-spec/crapi-openapi-spec.json b/openapi-spec/crapi-openapi-spec.json index ad7ed1bc..301eb806 100644 --- a/openapi-spec/crapi-openapi-spec.json +++ b/openapi-spec/crapi-openapi-spec.json @@ -3258,34 +3258,18 @@ "type" : "string" }, "amount" : { - "type" : "integer" + "type" : "string" } }, "required" : [ "coupon_code", "amount" ], "example" : { "coupon_code" : "TRAC075", - "amount" : 75 + "amount" : "75" } }, "AddCouponResponse" : { - "type" : "object", - "properties" : { - "amount" : { - "type" : "string" - }, - "coupon_code" : { - "type" : "string" - }, - "createdAt" : { - "type" : "string" - } - }, - "required" : [ "amount", "coupon_code", "CreatedAt" ], - "example" : { - "coupon_code" : "TRAC075", - "amount" : "75", - "CreatedAt" : "2023-12-07T14:22:29.832Z" - } + "type" : "string", + "example" : "Coupon added in database!" }, "ValidateCouponRequest" : { "type" : "object", diff --git a/services/chatbot/src/resources/crapi-openapi-spec.json b/services/chatbot/src/resources/crapi-openapi-spec.json index 9c12a523..b88ff4f1 100644 --- a/services/chatbot/src/resources/crapi-openapi-spec.json +++ b/services/chatbot/src/resources/crapi-openapi-spec.json @@ -2518,7 +2518,7 @@ "type": "string" }, "amount": { - "type": "integer" + "type": "string" } }, "required": [ @@ -2527,7 +2527,7 @@ ], "example": { "coupon_code": "TRAC075", - "amount": 75 + "amount": "75" } } } @@ -2539,28 +2539,8 @@ "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "coupon_code": { - "type": "string" - }, - "createdAt": { - "type": "string" - } - }, - "required": [ - "amount", - "coupon_code", - "CreatedAt" - ], - "example": { - "coupon_code": "TRAC075", - "amount": "75", - "CreatedAt": "2023-12-07T14:22:29.832Z" - } + "type": "string", + "example": "Coupon added in database!" } } } @@ -5152,7 +5132,7 @@ "type": "string" }, "amount": { - "type": "integer" + "type": "string" } }, "required": [ @@ -5161,32 +5141,12 @@ ], "example": { "coupon_code": "TRAC075", - "amount": 75 + "amount": "75" } }, "AddCouponResponse": { - "type": "object", - "properties": { - "amount": { - "type": "string" - }, - "coupon_code": { - "type": "string" - }, - "createdAt": { - "type": "string" - } - }, - "required": [ - "amount", - "coupon_code", - "CreatedAt" - ], - "example": { - "coupon_code": "TRAC075", - "amount": "75", - "CreatedAt": "2023-12-07T14:22:29.832Z" - } + "type": "string", + "example": "Coupon added in database!" }, "ValidateCouponRequest": { "type": "object",