2525import io .swagger .v3 .oas .annotations .media .Schema ;
2626import io .swagger .v3 .oas .annotations .parameters .RequestBody ;
2727import io .swagger .v3 .oas .annotations .responses .ApiResponse ;
28- import io .swagger .v3 .oas .annotations .responses .ApiResponses ;
2928import io .swagger .v3 .oas .annotations .tags .Tag ;
3029import jakarta .ws .rs .Consumes ;
3130import jakarta .ws .rs .DELETE ;
@@ -77,8 +76,7 @@ public class TellerApiResource {
7776 @ Consumes ({ MediaType .TEXT_HTML , MediaType .APPLICATION_JSON })
7877 @ Produces (MediaType .APPLICATION_JSON )
7978 @ Operation (summary = "List all tellers" , description = "Retrieves list tellers" )
80- @ ApiResponses ({
81- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (array = @ ArraySchema (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersResponse .class )))) })
79+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (array = @ ArraySchema (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersResponse .class ))))
8280 public Collection <TellerData > getTellerData (@ QueryParam ("officeId" ) @ Parameter (description = "officeId" ) final Long officeId ) {
8381 return readPlatformService .getTellers (officeId );
8482 }
@@ -88,8 +86,7 @@ public Collection<TellerData> getTellerData(@QueryParam("officeId") @Parameter(d
8886 @ Consumes ({ MediaType .TEXT_HTML , MediaType .APPLICATION_JSON })
8987 @ Produces (MediaType .APPLICATION_JSON )
9088 @ Operation (summary = "Retrieve tellers" , description = "" )
91- @ ApiResponses ({
92- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersResponse .class ))) })
89+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersResponse .class )))
9390 public TellerData findTeller (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ) {
9491 return readPlatformService .findTeller (tellerId );
9592 }
@@ -103,8 +100,7 @@ public TellerData findTeller(@PathParam("tellerId") @Parameter(description = "te
103100 Optional Fields
104101 End Date""" )
105102 @ RequestBody (required = true , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersRequest .class )))
106- @ ApiResponses ({
107- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersResponse .class ))) })
103+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersResponse .class )))
108104 public CommandProcessingResult createTeller (@ Parameter (hidden = true ) TellerRequest tellerData ) {
109105 final CommandWrapper request = new CommandWrapperBuilder ().createTeller ().withJson (apiJsonSerializer .serialize (tellerData )).build ();
110106
@@ -117,8 +113,7 @@ public CommandProcessingResult createTeller(@Parameter(hidden = true) TellerRequ
117113 @ Produces (MediaType .APPLICATION_JSON )
118114 @ Operation (summary = "Update teller" , description = "" )
119115 @ RequestBody (required = true , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PutTellersRequest .class )))
120- @ ApiResponses ({
121- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PutTellersResponse .class ))) })
116+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PutTellersResponse .class )))
122117 public CommandProcessingResult updateTeller (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
123118 @ Parameter (hidden = true ) TellerRequest tellerData ) {
124119 final CommandWrapper request = new CommandWrapperBuilder ().updateTeller (tellerId ).withJson (apiJsonSerializer .serialize (tellerData ))
@@ -141,8 +136,7 @@ public CommandProcessingResult deleteTeller(@PathParam("tellerId") @Parameter(de
141136 @ Consumes ({ MediaType .TEXT_HTML , MediaType .APPLICATION_JSON })
142137 @ Produces (MediaType .APPLICATION_JSON )
143138 @ Operation (summary = "List Cashiers" , description = "" )
144- @ ApiResponses ({
145- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersResponse .class ))) })
139+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersResponse .class )))
146140 public CashiersForTeller getCashierData (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
147141 @ QueryParam ("fromdate" ) @ Parameter (description = "fromdate" ) final String fromDateStr ,
148142 @ QueryParam ("todate" ) @ Parameter (description = "todate" ) final String toDateStr ) {
@@ -162,8 +156,7 @@ public CashiersForTeller getCashierData(@PathParam("tellerId") @Parameter(descri
162156 @ Consumes ({ MediaType .TEXT_HTML , MediaType .APPLICATION_JSON })
163157 @ Produces (MediaType .APPLICATION_JSON )
164158 @ Operation (summary = "Retrieve a cashier" , description = "" )
165- @ ApiResponses ({
166- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersCashierIdResponse .class ))) })
159+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersCashierIdResponse .class )))
167160 public CashierData findCashierData (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
168161 @ PathParam ("cashierId" ) @ Parameter (description = "cashierId" ) final Long cashierId ) {
169162 return readPlatformService .findCashier (cashierId );
@@ -174,8 +167,7 @@ public CashierData findCashierData(@PathParam("tellerId") @Parameter(description
174167 @ Consumes ({ MediaType .TEXT_HTML , MediaType .APPLICATION_JSON })
175168 @ Produces (MediaType .APPLICATION_JSON )
176169 @ Operation (summary = "Find Cashiers" , description = "" )
177- @ ApiResponses ({
178- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersTemplateResponse .class ))) })
170+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersTemplateResponse .class )))
179171 public CashierData getCashierTemplate (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ) {
180172
181173 final TellerData teller = this .readPlatformService .findTeller (tellerId );
@@ -197,8 +189,7 @@ public CashierData getCashierTemplate(@PathParam("tellerId") @Parameter(descript
197189 Optional Fields:\s
198190 Description/Notes""" )
199191 @ RequestBody (required = true , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersRequest .class )))
200- @ ApiResponses ({
201- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersResponse .class ))) })
192+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersResponse .class )))
202193 public CommandProcessingResult createCashier (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
203194 @ Parameter (hidden = true ) final CashierRequest cashierData ) {
204195 final CommandWrapper request = new CommandWrapperBuilder ().allocateTeller (tellerId )
@@ -213,8 +204,7 @@ public CommandProcessingResult createCashier(@PathParam("tellerId") @Parameter(d
213204 @ Produces (MediaType .APPLICATION_JSON )
214205 @ Operation (summary = "Update Cashier" , description = "" )
215206 @ RequestBody (required = true , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PutTellersTellerIdCashiersCashierIdRequest .class )))
216- @ ApiResponses ({
217- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PutTellersTellerIdCashiersCashierIdResponse .class ))) })
207+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PutTellersTellerIdCashiersCashierIdResponse .class )))
218208 public CommandProcessingResult updateCashier (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
219209 @ PathParam ("cashierId" ) @ Parameter (description = "cashierId" ) final Long cashierId ,
220210 @ Parameter (hidden = true ) final CashierRequest cashierDate ) {
@@ -230,8 +220,7 @@ public CommandProcessingResult updateCashier(@PathParam("tellerId") @Parameter(d
230220 @ Consumes ({ MediaType .TEXT_HTML , MediaType .APPLICATION_JSON })
231221 @ Produces (MediaType .APPLICATION_JSON )
232222 @ Operation (summary = "Delete Cashier" , description = "" )
233- @ ApiResponses ({
234- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .DeleteTellersTellerIdCashiersCashierIdResponse .class ))) })
223+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .DeleteTellersTellerIdCashiersCashierIdResponse .class )))
235224 public CommandProcessingResult deleteCashier (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
236225 @ PathParam ("cashierId" ) @ Parameter (description = "cashierId" ) final Long cashierId ) {
237226 final CommandWrapper request = new CommandWrapperBuilder ().deleteAllocationTeller (tellerId , cashierId ).build ();
@@ -246,8 +235,7 @@ public CommandProcessingResult deleteCashier(@PathParam("tellerId") @Parameter(d
246235 @ Produces (MediaType .APPLICATION_JSON )
247236 @ Operation (summary = "Allocate Cash To Cashier" , description = "Mandatory Fields: \n " + "Date, Amount, Currency, Notes/Comments" )
248237 @ RequestBody (required = true , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersCashierIdAllocateRequest .class )))
249- @ ApiResponses ({
250- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersCashierIdAllocateResponse .class ))) })
238+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersCashierIdAllocateResponse .class )))
251239 public CommandProcessingResult allocateCashToCashier (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
252240 @ PathParam ("cashierId" ) @ Parameter (description = "cashierId" ) final Long cashierId ,
253241 @ Parameter (hidden = true ) CashierTransactionRequest cashierTxnData ) {
@@ -264,8 +252,7 @@ public CommandProcessingResult allocateCashToCashier(@PathParam("tellerId") @Par
264252 @ Produces (MediaType .APPLICATION_JSON )
265253 @ Operation (summary = "Settle Cash From Cashier" , description = "Mandatory Fields\n " + "Date, Amount, Currency, Notes/Comments" )
266254 @ RequestBody (required = true , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersCashierIdSettleRequest .class )))
267- @ ApiResponses ({
268- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersCashierIdSettleResponse .class ))) })
255+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .PostTellersTellerIdCashiersCashierIdSettleResponse .class )))
269256 public CommandProcessingResult settleCashFromCashier (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
270257 @ PathParam ("cashierId" ) @ Parameter (description = "cashierId" ) final Long cashierId ,
271258 @ Parameter (hidden = true ) CashierTransactionRequest cashierTxnData ) {
@@ -280,8 +267,7 @@ public CommandProcessingResult settleCashFromCashier(@PathParam("tellerId") @Par
280267 @ Consumes ({ MediaType .APPLICATION_JSON })
281268 @ Produces (MediaType .APPLICATION_JSON )
282269 @ Operation (summary = "Retrieve Cashier Transactions" , description = "" )
283- @ ApiResponses ({
284- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersCashiersIdTransactionsResponse .class ))) })
270+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersCashiersIdTransactionsResponse .class )))
285271 public Page <CashierTransactionData > getTransactionsForCashier (
286272 @ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
287273 @ PathParam ("cashierId" ) @ Parameter (description = "cashierId" ) final Long cashierId ,
@@ -301,8 +287,7 @@ public Page<CashierTransactionData> getTransactionsForCashier(
301287 @ Consumes ({ MediaType .APPLICATION_JSON })
302288 @ Produces (MediaType .APPLICATION_JSON )
303289 @ Operation (summary = "Retrieve Transactions With Summary For Cashier" , description = "" )
304- @ ApiResponses ({
305- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse .class ))) })
290+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse .class )))
306291 public CashierTransactionsWithSummaryData getTransactionsWithSummaryForCashier (
307292 @ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
308293 @ PathParam ("cashierId" ) @ Parameter (description = "cashierId" ) final Long cashierId ,
@@ -324,8 +309,7 @@ public CashierTransactionsWithSummaryData getTransactionsWithSummaryForCashier(
324309 @ Consumes ({ MediaType .TEXT_HTML , MediaType .APPLICATION_JSON })
325310 @ Produces (MediaType .APPLICATION_JSON )
326311 @ Operation (summary = "Retrieve Cashier Transaction Template" , description = "" )
327- @ ApiResponses ({
328- @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse .class ))) })
312+ @ ApiResponse (responseCode = "200" , description = "OK" , content = @ Content (schema = @ Schema (implementation = TellerApiResourceSwagger .GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse .class )))
329313 public CashierTransactionData getCashierTxnTemplate (@ PathParam ("tellerId" ) @ Parameter (description = "tellerId" ) final Long tellerId ,
330314 @ PathParam ("cashierId" ) @ Parameter (description = "cashierId" ) final Long cashierId ) {
331315
0 commit comments