Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit 0613599

Browse files
committed
refactor code
1 parent 0b444d0 commit 0613599

10 files changed

Lines changed: 302 additions & 96 deletions

File tree

eventcatalog/asyncapi-files/inventory-service.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ components:
8383
type: string
8484
default: event
8585
description: Type of message for EventCatalog
86+
additionalProperties: false
8687
payload:
8788
type: object
8889
properties:
@@ -104,6 +105,8 @@ components:
104105
quantity:
105106
type: integer
106107
description: Quantity of the item reserved
108+
additionalProperties: false
109+
additionalProperties: false
107110

108111
InventoryReleased:
109112
description: 'Event triggered when reserved inventory is released due to order cancellation or expiration'
@@ -115,6 +118,7 @@ components:
115118
type: string
116119
default: event
117120
description: Type of message for EventCatalog
121+
additionalProperties: false
118122
payload:
119123
type: object
120124
properties:
@@ -136,6 +140,8 @@ components:
136140
quantity:
137141
type: integer
138142
description: Quantity of the item released
143+
additionalProperties: false
144+
additionalProperties: false
139145

140146
InventoryUpdated:
141147
description: 'Event triggered when inventory levels are updated due to restocking or sales'
@@ -147,6 +153,7 @@ components:
147153
type: string
148154
default: event
149155
description: Type of message for EventCatalog
156+
additionalProperties: false
150157
payload:
151158
type: object
152159
properties:
@@ -156,6 +163,7 @@ components:
156163
newQuantity:
157164
type: integer
158165
description: Updated quantity of the item in inventory
166+
additionalProperties: false
159167

160168
OrderCreated:
161169
description: 'Event received when a new order is created, triggering inventory reservation'
@@ -167,6 +175,7 @@ components:
167175
type: string
168176
default: event
169177
description: Type of message for EventCatalog
178+
additionalProperties: false
170179
payload:
171180
type: object
172181
properties:
@@ -185,6 +194,8 @@ components:
185194
quantity:
186195
type: integer
187196
description: Quantity of the item ordered
197+
additionalProperties: false
198+
additionalProperties: false
188199

189200
OrderCancelled:
190201
description: 'Event received when an order is cancelled, triggering inventory release'
@@ -196,6 +207,7 @@ components:
196207
type: string
197208
default: event
198209
description: Type of message for EventCatalog
210+
additionalProperties: false
199211
payload:
200212
type: object
201213
properties:
@@ -214,3 +226,5 @@ components:
214226
quantity:
215227
type: integer
216228
description: Quantity of the item ordered
229+
additionalProperties: false
230+
additionalProperties: false

eventcatalog/asyncapi-files/order-fulfillment-service.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ components:
5757
type: string
5858
default: event
5959
description: Type of message for EventCatalog
60+
additionalProperties: false
6061
payload:
6162
type: object
6263
properties:
@@ -78,6 +79,8 @@ components:
7879
quantity:
7980
type: integer
8081
description: Quantity of the item reserved
82+
additionalProperties: false
83+
additionalProperties: false
8184

8285
OrderShipped:
8386
description: 'Event triggered when an order is shipped'
@@ -89,6 +92,7 @@ components:
8992
type: string
9093
default: event
9194
description: Type of message for EventCatalog
95+
additionalProperties: false
9296
payload:
9397
type: object
9498
properties:
@@ -105,6 +109,7 @@ components:
105109
carrier:
106110
type: string
107111
description: Name of the carrier handling the shipment
112+
additionalProperties: false
108113

109114
ShipmentDelivered:
110115
description: 'Event triggered when a shipment is delivered to the customer'
@@ -116,6 +121,7 @@ components:
116121
type: string
117122
default: event
118123
description: Type of message for EventCatalog
124+
additionalProperties: false
119125
payload:
120126
type: object
121127
properties:
@@ -129,3 +135,4 @@ components:
129135
type: string
130136
format: date-time
131137
description: Time when the shipment was delivered
138+
additionalProperties: false

eventcatalog/asyncapi-files/orders-service.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ components:
8686
type: number
8787
format: float
8888
description: Price of the item
89+
additionalProperties: false
8990
messages:
9091
OrderCreated:
9192
description: 'Event triggered when an order is created'
@@ -97,6 +98,7 @@ components:
9798
type: string
9899
default: event
99100
description: Type of message for EventCatalog
101+
additionalProperties: false
100102
payload:
101103
type: object
102104
properties:
@@ -115,6 +117,7 @@ components:
115117
description: List of items in the order
116118
items:
117119
$ref: '#/components/schemas/OrderItem'
120+
additionalProperties: false
118121

119122
OrderCancelled:
120123
description: 'Event triggered when an order is cancelled'
@@ -126,6 +129,7 @@ components:
126129
type: string
127130
default: event
128131
description: Type of message for EventCatalog
132+
additionalProperties: false
129133
payload:
130134
type: object
131135
properties:
@@ -135,6 +139,7 @@ components:
135139
reason:
136140
type: string
137141
description: Reason for the order cancellation
142+
additionalProperties: false
138143

139144
OrderCompleted:
140145
description: 'Event triggered when an order is completed'
@@ -146,6 +151,7 @@ components:
146151
type: string
147152
default: event
148153
description: Type of message for EventCatalog
154+
additionalProperties: false
149155
payload:
150156
type: object
151157
properties:
@@ -156,6 +162,7 @@ components:
156162
type: string
157163
format: date-time
158164
description: Time when the order was completed
165+
additionalProperties: false
159166

160167
PaymentFailed:
161168
description: 'Event received when a payment fails'
@@ -167,6 +174,7 @@ components:
167174
type: string
168175
default: event
169176
description: Type of message for EventCatalog
177+
additionalProperties: false
170178
payload:
171179
type: object
172180
properties:
@@ -179,6 +187,7 @@ components:
179187
failureReason:
180188
type: string
181189
description: Reason for the payment failure
190+
additionalProperties: false
182191

183192
ShipmentDelivered:
184193
description: 'Event received when a shipment is delivered'
@@ -190,6 +199,7 @@ components:
190199
type: string
191200
default: event
192201
description: Type of message for EventCatalog
202+
additionalProperties: false
193203
payload:
194204
type: object
195205
properties:
@@ -203,3 +213,4 @@ components:
203213
type: string
204214
format: date-time
205215
description: Time when the shipment was delivered
216+
additionalProperties: false

eventcatalog/asyncapi-files/payment-service.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ components:
8383
type: string
8484
default: event
8585
description: Type of message for EventCatalog
86+
additionalProperties: false
8687
payload:
8788
type: object
8889
properties:
@@ -112,6 +113,8 @@ components:
112113
type: number
113114
format: float
114115
description: Price of the item
116+
additionalProperties: false
117+
additionalProperties: false
115118

116119
PaymentProcessed:
117120
description: 'Event triggered when a payment is successfully processed'
@@ -123,6 +126,7 @@ components:
123126
type: string
124127
default: event
125128
description: Type of message for EventCatalog
129+
additionalProperties: false
126130
payload:
127131
type: object
128132
properties:
@@ -135,6 +139,7 @@ components:
135139
status:
136140
type: string
137141
description: Status of the payment
142+
additionalProperties: false
138143

139144
PaymentFailed:
140145
description: 'Event triggered when a payment fails'
@@ -146,6 +151,7 @@ components:
146151
type: string
147152
default: event
148153
description: Type of message for EventCatalog
154+
additionalProperties: false
149155
payload:
150156
type: object
151157
properties:
@@ -158,6 +164,7 @@ components:
158164
failureReason:
159165
type: string
160166
description: Reason for the payment failure
167+
additionalProperties: false
161168

162169
OrderCancelled:
163170
description: 'Event received when an order is cancelled, triggering refund if payment was made'
@@ -169,6 +176,7 @@ components:
169176
type: string
170177
default: event
171178
description: Type of message for EventCatalog
179+
additionalProperties: false
172180
payload:
173181
type: object
174182
properties:
@@ -178,6 +186,7 @@ components:
178186
reason:
179187
type: string
180188
description: Reason for the order cancellation
189+
additionalProperties: false
181190

182191
RefundInitiated:
183192
description: 'Event triggered when a refund is initiated due to order cancellation'
@@ -189,6 +198,7 @@ components:
189198
type: string
190199
default: event
191200
description: Type of message for EventCatalog
201+
additionalProperties: false
192202
payload:
193203
type: object
194204
properties:
@@ -205,3 +215,4 @@ components:
205215
type: number
206216
format: float
207217
description: Amount to be refunded
218+
additionalProperties: false

eventcatalog/asyncapi-files/user-service.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ components:
3131
type: string
3232
default: event
3333
description: Type of message for EventCatalog
34+
additionalProperties: false
3435
payload:
3536
type: object
3637
properties:
@@ -52,3 +53,4 @@ components:
5253
- userId
5354
- fullName
5455
- email
56+
additionalProperties: false

services/orders-service-codegen/codegen.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

services/orders-service-codegen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"nats": "^2.29.3"
1414
},
1515
"devDependencies": {
16-
"@the-codegen-project/cli": "^0.56.0",
16+
"@the-codegen-project/cli": "^0.57.0",
1717
"ts-node": "^10.9.2",
1818
"@types/node": "^22.13.10"
1919
}

0 commit comments

Comments
 (0)