@@ -71,25 +71,25 @@ func (co Controller) RegisterAccountRoutes(r *gin.RouterGroup) {
7171 }
7272}
7373
74- // @Summary Allowed HTTP verbs
75- // @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
76- // @Tags Accounts
77- // @Success 204
78- // @Failure 400 {object} httperrors.HTTPError
79- // @Failure 404
80- // @Router /v1/accounts [options]
74+ // @Summary Allowed HTTP verbs
75+ // @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
76+ // @Tags Accounts
77+ // @Success 204
78+ // @Failure 400 {object} httperrors.HTTPError
79+ // @Failure 404
80+ // @Router /v1/accounts [options]
8181func (co Controller ) OptionsAccountList (c * gin.Context ) {
8282 httputil .OptionsGetPost (c )
8383}
8484
85- // @Summary Allowed HTTP verbs
86- // @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
87- // @Tags Accounts
88- // @Success 204
89- // @Failure 400 {object} httperrors.HTTPError
90- // @Failure 404
91- // @Param accountId path string true "ID formatted as string"
92- // @Router /v1/accounts/{accountId} [options]
85+ // @Summary Allowed HTTP verbs
86+ // @Description Returns an empty response with the HTTP Header "allow" set to the allowed HTTP verbs
87+ // @Tags Accounts
88+ // @Success 204
89+ // @Failure 400 {object} httperrors.HTTPError
90+ // @Failure 404
91+ // @Param accountId path string true "ID formatted as string"
92+ // @Router /v1/accounts/{accountId} [options]
9393func (co Controller ) OptionsAccountDetail (c * gin.Context ) {
9494 p , err := uuid .Parse (c .Param ("accountId" ))
9595 if err != nil {
@@ -104,16 +104,16 @@ func (co Controller) OptionsAccountDetail(c *gin.Context) {
104104 httputil .OptionsGetPatchDelete (c )
105105}
106106
107- // @Summary Create account
108- // @Description Creates a new account
109- // @Tags Accounts
110- // @Produce json
111- // @Success 201 {object} AccountResponse
112- // @Failure 400 {object} httperrors.HTTPError
113- // @Failure 404
114- // @Failure 500 {object} httperrors.HTTPError
115- // @Param account body models.AccountCreate true "Account"
116- // @Router /v1/accounts [post]
107+ // @Summary Create account
108+ // @Description Creates a new account
109+ // @Tags Accounts
110+ // @Produce json
111+ // @Success 201 {object} AccountResponse
112+ // @Failure 400 {object} httperrors.HTTPError
113+ // @Failure 404
114+ // @Failure 500 {object} httperrors.HTTPError
115+ // @Param account body models.AccountCreate true "Account"
116+ // @Router /v1/accounts [post]
117117func (co Controller ) CreateAccount (c * gin.Context ) {
118118 var account models.Account
119119
@@ -135,20 +135,20 @@ func (co Controller) CreateAccount(c *gin.Context) {
135135 c .JSON (http .StatusCreated , AccountResponse {Data : accountObject })
136136}
137137
138- // @Summary List accounts
139- // @Description Returns a list of accounts
140- // @Tags Accounts
141- // @Produce json
142- // @Success 200 {object} AccountListResponse
143- // @Failure 400 {object} httperrors.HTTPError
144- // @Failure 404
145- // @Failure 500 {object} httperrors.HTTPError
146- // @Router /v1/accounts [get]
147- // @Param name query string false "Filter by name"
148- // @Param note query string false "Filter by note"
149- // @Param budget query string false "Filter by budget ID"
150- // @Param onBudget query bool false "Filter by on/off-budget"
151- // @Param external query bool false "Filter internal/external"
138+ // @Summary List accounts
139+ // @Description Returns a list of accounts
140+ // @Tags Accounts
141+ // @Produce json
142+ // @Success 200 {object} AccountListResponse
143+ // @Failure 400 {object} httperrors.HTTPError
144+ // @Failure 404
145+ // @Failure 500 {object} httperrors.HTTPError
146+ // @Router /v1/accounts [get]
147+ // @Param name query string false "Filter by name"
148+ // @Param note query string false "Filter by note"
149+ // @Param budget query string false "Filter by budget ID"
150+ // @Param onBudget query bool false "Filter by on/off-budget"
151+ // @Param external query bool false "Filter internal/external"
152152func (co Controller ) GetAccounts (c * gin.Context ) {
153153 var filter AccountQueryFilter
154154 if err := c .Bind (& filter ); err != nil {
@@ -185,16 +185,16 @@ func (co Controller) GetAccounts(c *gin.Context) {
185185 c .JSON (http .StatusOK , AccountListResponse {Data : accountObjects })
186186}
187187
188- // @Summary Get account
189- // @Description Returns a specific account
190- // @Tags Accounts
191- // @Produce json
192- // @Success 200 {object} AccountResponse
193- // @Failure 400 {object} httperrors.HTTPError
194- // @Failure 404
195- // @Failure 500 {object} httperrors.HTTPError
196- // @Param accountId path string true "ID formatted as string"
197- // @Router /v1/accounts/{accountId} [get]
188+ // @Summary Get account
189+ // @Description Returns a specific account
190+ // @Tags Accounts
191+ // @Produce json
192+ // @Success 200 {object} AccountResponse
193+ // @Failure 400 {object} httperrors.HTTPError
194+ // @Failure 404
195+ // @Failure 500 {object} httperrors.HTTPError
196+ // @Param accountId path string true "ID formatted as string"
197+ // @Router /v1/accounts/{accountId} [get]
198198func (co Controller ) GetAccount (c * gin.Context ) {
199199 p , err := uuid .Parse (c .Param ("accountId" ))
200200 if err != nil {
@@ -210,17 +210,17 @@ func (co Controller) GetAccount(c *gin.Context) {
210210 c .JSON (http .StatusOK , AccountResponse {Data : accountObject })
211211}
212212
213- // @Summary Update account
214- // @Description Updates an account. Only values to be updated need to be specified.
215- // @Tags Accounts
216- // @Produce json
217- // @Success 200 {object} AccountResponse
218- // @Failure 400 {object} httperrors.HTTPError
219- // @Failure 404
220- // @Failure 500 {object} httperrors.HTTPError
221- // @Param accountId path string true "ID formatted as string"
222- // @Param account body models.AccountCreate true "Account"
223- // @Router /v1/accounts/{accountId} [patch]
213+ // @Summary Update account
214+ // @Description Updates an account. Only values to be updated need to be specified.
215+ // @Tags Accounts
216+ // @Produce json
217+ // @Success 200 {object} AccountResponse
218+ // @Failure 400 {object} httperrors.HTTPError
219+ // @Failure 404
220+ // @Failure 500 {object} httperrors.HTTPError
221+ // @Param accountId path string true "ID formatted as string"
222+ // @Param account body models.AccountCreate true "Account"
223+ // @Router /v1/accounts/{accountId} [patch]
224224func (co Controller ) UpdateAccount (c * gin.Context ) {
225225 p , err := uuid .Parse (c .Param ("accountId" ))
226226 if err != nil {
@@ -251,16 +251,16 @@ func (co Controller) UpdateAccount(c *gin.Context) {
251251 c .JSON (http .StatusOK , AccountResponse {Data : accountObject })
252252}
253253
254- // @Summary Delete account
255- // @Description Deletes an account
256- // @Tags Accounts
257- // @Produce json
258- // @Success 204
259- // @Failure 400 {object} httperrors.HTTPError
260- // @Failure 404
261- // @Failure 500 {object} httperrors.HTTPError
262- // @Param accountId path string true "ID formatted as string"
263- // @Router /v1/accounts/{accountId} [delete]
254+ // @Summary Delete account
255+ // @Description Deletes an account
256+ // @Tags Accounts
257+ // @Produce json
258+ // @Success 204
259+ // @Failure 400 {object} httperrors.HTTPError
260+ // @Failure 404
261+ // @Failure 500 {object} httperrors.HTTPError
262+ // @Param accountId path string true "ID formatted as string"
263+ // @Router /v1/accounts/{accountId} [delete]
264264func (co Controller ) DeleteAccount (c * gin.Context ) {
265265 p , err := uuid .Parse (c .Param ("accountId" ))
266266 if err != nil {
0 commit comments