@@ -103,28 +103,24 @@ func (co Controller) RegisterBudgetRoutesV3(r *gin.RouterGroup) {
103103 }
104104}
105105
106- // OptionsBudgetListV3 returns the allowed HTTP methods
107- //
108- // @Summary Allowed HTTP verbs
109- // @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
110- // @Tags Budgets
111- // @Success 204
112- // @Router /v3/budgets [options]
106+ // @Summary Allowed HTTP verbs
107+ // @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
108+ // @Tags Budgets
109+ // @Success 204
110+ // @Router /v3/budgets [options]
113111func (co Controller ) OptionsBudgetListV3 (c * gin.Context ) {
114112 httputil .OptionsGetPost (c )
115113}
116114
117- // OptionsBudgetDetailV3 returns the allowed HTTP methods
118- //
119- // @Summary Allowed HTTP verbs
120- // @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
121- // @Tags Budgets
122- // @Success 204
123- // @Failure 400 {object} httperrors.HTTPError
124- // @Failure 404 {object} httperrors.HTTPError
125- // @Failure 500 {object} httperrors.HTTPError
126- // @Param id path string true "ID formatted as string"
127- // @Router /v3/budgets/{id} [options]
115+ // @Summary Allowed HTTP verbs
116+ // @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
117+ // @Tags Budgets
118+ // @Success 204
119+ // @Failure 400 {object} httperrors.HTTPError
120+ // @Failure 404 {object} httperrors.HTTPError
121+ // @Failure 500 {object} httperrors.HTTPError
122+ // @Param id path string true "ID formatted as string"
123+ // @Router /v3/budgets/{id} [options]
128124func (co Controller ) OptionsBudgetDetailV3 (c * gin.Context ) {
129125 id , err := httputil .UUIDFromString (c .Param ("id" ))
130126 if ! err .Nil () {
@@ -145,18 +141,16 @@ func (co Controller) OptionsBudgetDetailV3(c *gin.Context) {
145141 httputil .OptionsGetPatchDelete (c )
146142}
147143
148- // CreateBudgetV3 creates a new budget
149- //
150- // @Summary Create budget
151- // @Description Creates a new budget
152- // @Tags Budgets
153- // @Accept json
154- // @Produce json
155- // @Success 201 {object} BudgetCreateResponseV3
156- // @Failure 400 {object} BudgetCreateResponseV3
157- // @Failure 500 {object} BudgetCreateResponseV3
158- // @Param budget body models.BudgetCreate true "Budget"
159- // @Router /v3/budgets [post]
144+ // @Summary Create budget
145+ // @Description Creates a new budget
146+ // @Tags Budgets
147+ // @Accept json
148+ // @Produce json
149+ // @Success 201 {object} BudgetCreateResponseV3
150+ // @Failure 400 {object} BudgetCreateResponseV3
151+ // @Failure 500 {object} BudgetCreateResponseV3
152+ // @Param budget body models.BudgetCreate true "Budget"
153+ // @Router /v3/budgets [post]
160154func (co Controller ) CreateBudgetsV3 (c * gin.Context ) {
161155 var budgets []models.BudgetCreate
162156
@@ -217,19 +211,17 @@ func (co Controller) CreateBudgetsV3(c *gin.Context) {
217211 c .JSON (status , r )
218212}
219213
220- // GetBudgetsV3 returns data for all budgets filtered by the query parameters
221- //
222- // @Summary List budgets
223- // @Description Returns a list of budgets
224- // @Tags Budgets
225- // @Produce json
226- // @Success 200 {object} BudgetListResponseV3
227- // @Failure 500 {object} BudgetListResponseV3
228- // @Router /v3/budgets [get]
229- // @Param name query string false "Filter by name"
230- // @Param note query string false "Filter by note"
231- // @Param currency query string false "Filter by currency"
232- // @Param search query string false "Search for this text in name and note"
214+ // @Summary List budgets
215+ // @Description Returns a list of budgets
216+ // @Tags Budgets
217+ // @Produce json
218+ // @Success 200 {object} BudgetListResponseV3
219+ // @Failure 500 {object} BudgetListResponseV3
220+ // @Router /v3/budgets [get]
221+ // @Param name query string false "Filter by name"
222+ // @Param note query string false "Filter by note"
223+ // @Param currency query string false "Filter by currency"
224+ // @Param search query string false "Search for this text in name and note"
233225func (co Controller ) GetBudgetsV3 (c * gin.Context ) {
234226 var filter BudgetQueryFilterV3
235227
@@ -308,18 +300,16 @@ func (co Controller) GetBudgetsV3(c *gin.Context) {
308300 })
309301}
310302
311- // GetBudgetV3 returns data for a single budget
312- //
313- // @Summary Get budget
314- // @Description Returns a specific budget
315- // @Tags Budgets
316- // @Produce json
317- // @Success 200 {object} BudgetResponseV3
318- // @Failure 400 {object} BudgetResponseV3
319- // @Failure 404 {object} BudgetResponseV3
320- // @Failure 500 {object} BudgetResponseV3
321- // @Param id path string true "ID formatted as string"
322- // @Router /v3/budgets/{id} [get]
303+ // @Summary Get budget
304+ // @Description Returns a specific budget
305+ // @Tags Budgets
306+ // @Produce json
307+ // @Success 200 {object} BudgetResponseV3
308+ // @Failure 400 {object} BudgetResponseV3
309+ // @Failure 404 {object} BudgetResponseV3
310+ // @Failure 500 {object} BudgetResponseV3
311+ // @Param id path string true "ID formatted as string"
312+ // @Router /v3/budgets/{id} [get]
323313func (co Controller ) GetBudgetV3 (c * gin.Context ) {
324314 id , err := httputil .UUIDFromString (c .Param ("id" ))
325315 if ! err .Nil () {
@@ -351,20 +341,18 @@ func (co Controller) GetBudgetV3(c *gin.Context) {
351341 c .JSON (http .StatusOK , BudgetResponseV3 {Data : & r })
352342}
353343
354- // UpdateBudgetV3 updates data for a budget
355- //
356- // @Summary Update budget
357- // @Description Update an existing budget. Only values to be updated need to be specified.
358- // @Tags Budgets
359- // @Accept json
360- // @Produce json
361- // @Success 200 {object} BudgetResponseV3
362- // @Failure 400 {object} BudgetResponseV3
363- // @Failure 404 {object} BudgetResponseV3
364- // @Failure 500 {object} BudgetResponseV3
365- // @Param id path string true "ID formatted as string"
366- // @Param budget body models.BudgetCreate true "Budget"
367- // @Router /v3/budgets/{id} [patch]
344+ // @Summary Update budget
345+ // @Description Update an existing budget. Only values to be updated need to be specified.
346+ // @Tags Budgets
347+ // @Accept json
348+ // @Produce json
349+ // @Success 200 {object} BudgetResponseV3
350+ // @Failure 400 {object} BudgetResponseV3
351+ // @Failure 404 {object} BudgetResponseV3
352+ // @Failure 500 {object} BudgetResponseV3
353+ // @Param id path string true "ID formatted as string"
354+ // @Param budget body models.BudgetCreate true "Budget"
355+ // @Router /v3/budgets/{id} [patch]
368356func (co Controller ) UpdateBudgetV3 (c * gin.Context ) {
369357 id , err := httputil .UUIDFromString (c .Param ("id" ))
370358 if ! err .Nil () {
@@ -424,17 +412,15 @@ func (co Controller) UpdateBudgetV3(c *gin.Context) {
424412 c .JSON (http .StatusOK , BudgetResponseV3 {Data : & r })
425413}
426414
427- // DeleteBudgetV3 deletes a budget
428- //
429- // @Summary Delete budget
430- // @Description Deletes a budget
431- // @Tags Budgets
432- // @Success 204
433- // @Failure 400 {object} httperrors.HTTPError
434- // @Failure 404 {object} httperrors.HTTPError
435- // @Failure 500 {object} httperrors.HTTPError
436- // @Param id path string true "ID formatted as string"
437- // @Router /v3/budgets/{id} [delete]
415+ // @Summary Delete budget
416+ // @Description Deletes a budget
417+ // @Tags Budgets
418+ // @Success 204
419+ // @Failure 400 {object} httperrors.HTTPError
420+ // @Failure 404 {object} httperrors.HTTPError
421+ // @Failure 500 {object} httperrors.HTTPError
422+ // @Param id path string true "ID formatted as string"
423+ // @Router /v3/budgets/{id} [delete]
438424func (co Controller ) DeleteBudgetV3 (c * gin.Context ) {
439425 id , err := httputil .UUIDFromString (c .Param ("id" ))
440426 if ! err .Nil () {
0 commit comments