Skip to content

Commit 3ef1669

Browse files
authored
chore: deprecate /v1/budgets endpoints (#861)
1 parent d7f57cf commit 3ef1669

File tree

4 files changed

+28
-0
lines changed

4 files changed

+28
-0
lines changed

api/docs.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ const docTemplate = `{
747747
"Budgets"
748748
],
749749
"summary": "List budgets",
750+
"deprecated": true,
750751
"parameters": [
751752
{
752753
"type": "string",
@@ -800,6 +801,7 @@ const docTemplate = `{
800801
"Budgets"
801802
],
802803
"summary": "Create budget",
804+
"deprecated": true,
803805
"parameters": [
804806
{
805807
"description": "Budget",
@@ -838,6 +840,7 @@ const docTemplate = `{
838840
"Budgets"
839841
],
840842
"summary": "Allowed HTTP verbs",
843+
"deprecated": true,
841844
"responses": {
842845
"204": {
843846
"description": "No Content"
@@ -855,6 +858,7 @@ const docTemplate = `{
855858
"Budgets"
856859
],
857860
"summary": "Get budget",
861+
"deprecated": true,
858862
"parameters": [
859863
{
860864
"type": "string",
@@ -897,6 +901,7 @@ const docTemplate = `{
897901
"Budgets"
898902
],
899903
"summary": "Delete budget",
904+
"deprecated": true,
900905
"parameters": [
901906
{
902907
"type": "string",
@@ -936,6 +941,7 @@ const docTemplate = `{
936941
"Budgets"
937942
],
938943
"summary": "Allowed HTTP verbs",
944+
"deprecated": true,
939945
"parameters": [
940946
{
941947
"type": "string",
@@ -981,6 +987,7 @@ const docTemplate = `{
981987
"Budgets"
982988
],
983989
"summary": "Update budget",
990+
"deprecated": true,
984991
"parameters": [
985992
{
986993
"type": "string",

api/swagger.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@
736736
"Budgets"
737737
],
738738
"summary": "List budgets",
739+
"deprecated": true,
739740
"parameters": [
740741
{
741742
"type": "string",
@@ -789,6 +790,7 @@
789790
"Budgets"
790791
],
791792
"summary": "Create budget",
793+
"deprecated": true,
792794
"parameters": [
793795
{
794796
"description": "Budget",
@@ -827,6 +829,7 @@
827829
"Budgets"
828830
],
829831
"summary": "Allowed HTTP verbs",
832+
"deprecated": true,
830833
"responses": {
831834
"204": {
832835
"description": "No Content"
@@ -844,6 +847,7 @@
844847
"Budgets"
845848
],
846849
"summary": "Get budget",
850+
"deprecated": true,
847851
"parameters": [
848852
{
849853
"type": "string",
@@ -886,6 +890,7 @@
886890
"Budgets"
887891
],
888892
"summary": "Delete budget",
893+
"deprecated": true,
889894
"parameters": [
890895
{
891896
"type": "string",
@@ -925,6 +930,7 @@
925930
"Budgets"
926931
],
927932
"summary": "Allowed HTTP verbs",
933+
"deprecated": true,
928934
"parameters": [
929935
{
930936
"type": "string",
@@ -970,6 +976,7 @@
970976
"Budgets"
971977
],
972978
"summary": "Update budget",
979+
"deprecated": true,
973980
"parameters": [
974981
{
975982
"type": "string",

api/swagger.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,6 +2260,7 @@ paths:
22602260
- Allocations
22612261
/v1/budgets:
22622262
get:
2263+
deprecated: true
22632264
description: Returns a list of budgets
22642265
parameters:
22652266
- description: Filter by name
@@ -2293,6 +2294,7 @@ paths:
22932294
tags:
22942295
- Budgets
22952296
options:
2297+
deprecated: true
22962298
description: Returns an empty response with the HTTP Header "allow" set to the
22972299
allowed HTTP verbs
22982300
responses:
@@ -2304,6 +2306,7 @@ paths:
23042306
post:
23052307
consumes:
23062308
- application/json
2309+
deprecated: true
23072310
description: Creates a new budget
23082311
parameters:
23092312
- description: Budget
@@ -2332,6 +2335,7 @@ paths:
23322335
- Budgets
23332336
/v1/budgets/{id}:
23342337
delete:
2338+
deprecated: true
23352339
description: Deletes a budget
23362340
parameters:
23372341
- description: ID formatted as string
@@ -2358,6 +2362,7 @@ paths:
23582362
tags:
23592363
- Budgets
23602364
get:
2365+
deprecated: true
23612366
description: Returns a specific budget
23622367
parameters:
23632368
- description: ID formatted as string
@@ -2388,6 +2393,7 @@ paths:
23882393
tags:
23892394
- Budgets
23902395
options:
2396+
deprecated: true
23912397
description: Returns an empty response with the HTTP Header "allow" set to the
23922398
allowed HTTP verbs
23932399
parameters:
@@ -2417,6 +2423,7 @@ paths:
24172423
patch:
24182424
consumes:
24192425
- application/json
2426+
deprecated: true
24202427
description: Update an existing budget. Only values to be updated need to be
24212428
specified.
24222429
parameters:

pkg/controllers/budget_v1.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ func (co Controller) RegisterBudgetRoutes(r *gin.RouterGroup) {
116116
// @Tags Budgets
117117
// @Success 204
118118
// @Router /v1/budgets [options]
119+
// @Deprecated true
119120
func (co Controller) OptionsBudgetList(c *gin.Context) {
120121
httputil.OptionsGetPost(c)
121122
}
@@ -131,6 +132,7 @@ func (co Controller) OptionsBudgetList(c *gin.Context) {
131132
// @Failure 500 {object} httperrors.HTTPError
132133
// @Param id path string true "ID formatted as string"
133134
// @Router /v1/budgets/{id} [options]
135+
// @Deprecated true
134136
func (co Controller) OptionsBudgetDetail(c *gin.Context) {
135137
id, err := uuid.Parse(c.Param("id"))
136138
if err != nil {
@@ -223,6 +225,7 @@ func (co Controller) OptionsBudgetMonthAllocations(c *gin.Context) {
223225
// @Failure 500 {object} httperrors.HTTPError
224226
// @Param budget body models.BudgetCreate true "Budget"
225227
// @Router /v1/budgets [post]
228+
// @Deprecated true
226229
func (co Controller) CreateBudget(c *gin.Context) {
227230
var bCreate models.BudgetCreate
228231

@@ -259,6 +262,7 @@ func (co Controller) CreateBudget(c *gin.Context) {
259262
// @Param note query string false "Filter by note"
260263
// @Param currency query string false "Filter by currency"
261264
// @Param search query string false "Search for this text in name and note"
265+
// @Deprecated true
262266
func (co Controller) GetBudgets(c *gin.Context) {
263267
var filter BudgetQueryFilter
264268

@@ -308,6 +312,7 @@ func (co Controller) GetBudgets(c *gin.Context) {
308312
// @Failure 500 {object} httperrors.HTTPError
309313
// @Param id path string true "ID formatted as string"
310314
// @Router /v1/budgets/{id} [get]
315+
// @Deprecated true
311316
func (co Controller) GetBudget(c *gin.Context) {
312317
id, err := uuid.Parse(c.Param("id"))
313318
if err != nil {
@@ -469,6 +474,7 @@ func (co Controller) GetBudgetMonth(c *gin.Context) {
469474
// @Param id path string true "ID formatted as string"
470475
// @Param budget body models.BudgetCreate true "Budget"
471476
// @Router /v1/budgets/{id} [patch]
477+
// @Deprecated true
472478
func (co Controller) UpdateBudget(c *gin.Context) {
473479
id, err := uuid.Parse(c.Param("id"))
474480
if err != nil {
@@ -514,6 +520,7 @@ func (co Controller) UpdateBudget(c *gin.Context) {
514520
// @Failure 500 {object} httperrors.HTTPError
515521
// @Param id path string true "ID formatted as string"
516522
// @Router /v1/budgets/{id} [delete]
523+
// @Deprecated true
517524
func (co Controller) DeleteBudget(c *gin.Context) {
518525
id, err := uuid.Parse(c.Param("id"))
519526
if err != nil {

0 commit comments

Comments
 (0)