Skip to content

Commit e8a3ab7

Browse files
request and response matched with spec (#345)
Co-authored-by: Roshan Piyush <[email protected]>
1 parent ea44348 commit e8a3ab7

File tree

2 files changed

+12
-68
lines changed

2 files changed

+12
-68
lines changed

openapi-spec/crapi-openapi-spec.json

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3258,34 +3258,18 @@
32583258
"type" : "string"
32593259
},
32603260
"amount" : {
3261-
"type" : "integer"
3261+
"type" : "string"
32623262
}
32633263
},
32643264
"required" : [ "coupon_code", "amount" ],
32653265
"example" : {
32663266
"coupon_code" : "TRAC075",
3267-
"amount" : 75
3267+
"amount" : "75"
32683268
}
32693269
},
32703270
"AddCouponResponse" : {
3271-
"type" : "object",
3272-
"properties" : {
3273-
"amount" : {
3274-
"type" : "string"
3275-
},
3276-
"coupon_code" : {
3277-
"type" : "string"
3278-
},
3279-
"createdAt" : {
3280-
"type" : "string"
3281-
}
3282-
},
3283-
"required" : [ "amount", "coupon_code", "CreatedAt" ],
3284-
"example" : {
3285-
"coupon_code" : "TRAC075",
3286-
"amount" : "75",
3287-
"CreatedAt" : "2023-12-07T14:22:29.832Z"
3288-
}
3271+
"type" : "string",
3272+
"example" : "Coupon added in database!"
32893273
},
32903274
"ValidateCouponRequest" : {
32913275
"type" : "object",

services/chatbot/src/resources/crapi-openapi-spec.json

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2518,7 +2518,7 @@
25182518
"type": "string"
25192519
},
25202520
"amount": {
2521-
"type": "integer"
2521+
"type": "string"
25222522
}
25232523
},
25242524
"required": [
@@ -2527,7 +2527,7 @@
25272527
],
25282528
"example": {
25292529
"coupon_code": "TRAC075",
2530-
"amount": 75
2530+
"amount": "75"
25312531
}
25322532
}
25332533
}
@@ -2539,28 +2539,8 @@
25392539
"content": {
25402540
"application/json": {
25412541
"schema": {
2542-
"type": "object",
2543-
"properties": {
2544-
"amount": {
2545-
"type": "string"
2546-
},
2547-
"coupon_code": {
2548-
"type": "string"
2549-
},
2550-
"createdAt": {
2551-
"type": "string"
2552-
}
2553-
},
2554-
"required": [
2555-
"amount",
2556-
"coupon_code",
2557-
"CreatedAt"
2558-
],
2559-
"example": {
2560-
"coupon_code": "TRAC075",
2561-
"amount": "75",
2562-
"CreatedAt": "2023-12-07T14:22:29.832Z"
2563-
}
2542+
"type": "string",
2543+
"example": "Coupon added in database!"
25642544
}
25652545
}
25662546
}
@@ -5152,7 +5132,7 @@
51525132
"type": "string"
51535133
},
51545134
"amount": {
5155-
"type": "integer"
5135+
"type": "string"
51565136
}
51575137
},
51585138
"required": [
@@ -5161,32 +5141,12 @@
51615141
],
51625142
"example": {
51635143
"coupon_code": "TRAC075",
5164-
"amount": 75
5144+
"amount": "75"
51655145
}
51665146
},
51675147
"AddCouponResponse": {
5168-
"type": "object",
5169-
"properties": {
5170-
"amount": {
5171-
"type": "string"
5172-
},
5173-
"coupon_code": {
5174-
"type": "string"
5175-
},
5176-
"createdAt": {
5177-
"type": "string"
5178-
}
5179-
},
5180-
"required": [
5181-
"amount",
5182-
"coupon_code",
5183-
"CreatedAt"
5184-
],
5185-
"example": {
5186-
"coupon_code": "TRAC075",
5187-
"amount": "75",
5188-
"CreatedAt": "2023-12-07T14:22:29.832Z"
5189-
}
5148+
"type": "string",
5149+
"example": "Coupon added in database!"
51905150
},
51915151
"ValidateCouponRequest": {
51925152
"type": "object",

0 commit comments

Comments
 (0)