Skip to content

Commit

Permalink
chore: deprecate /v1/transactions and /v2/transactions endpoints (#841)
Browse files Browse the repository at this point in the history
  • Loading branch information
morremeyer authored Nov 13, 2023
1 parent 6f71fad commit 4308b38
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2637,6 +2637,7 @@ const docTemplate = `{
"Transactions"
],
"summary": "Get transactions",
"deprecated": true,
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -2804,6 +2805,7 @@ const docTemplate = `{
"Transactions"
],
"summary": "Allowed HTTP verbs",
"deprecated": true,
"responses": {
"204": {
"description": "No Content"
Expand Down Expand Up @@ -3737,6 +3739,7 @@ const docTemplate = `{
"Transactions"
],
"summary": "Create transactions",
"deprecated": true,
"parameters": [
{
"description": "Transactions",
Expand Down Expand Up @@ -3793,6 +3796,7 @@ const docTemplate = `{
"Transactions"
],
"summary": "Allowed HTTP verbs",
"deprecated": true,
"responses": {
"204": {
"description": "No Content"
Expand Down
4 changes: 4 additions & 0 deletions api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2626,6 +2626,7 @@
"Transactions"
],
"summary": "Get transactions",
"deprecated": true,
"parameters": [
{
"type": "string",
Expand Down Expand Up @@ -2793,6 +2794,7 @@
"Transactions"
],
"summary": "Allowed HTTP verbs",
"deprecated": true,
"responses": {
"204": {
"description": "No Content"
Expand Down Expand Up @@ -3726,6 +3728,7 @@
"Transactions"
],
"summary": "Create transactions",
"deprecated": true,
"parameters": [
{
"description": "Transactions",
Expand Down Expand Up @@ -3782,6 +3785,7 @@
"Transactions"
],
"summary": "Allowed HTTP verbs",
"deprecated": true,
"responses": {
"204": {
"description": "No Content"
Expand Down
4 changes: 4 additions & 0 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3323,6 +3323,7 @@ paths:
- Months
/v1/transactions:
get:
deprecated: true
description: Returns a list of transactions
parameters:
- description: Date of the transaction. Ignores exact time, matches on the day
Expand Down Expand Up @@ -3408,6 +3409,7 @@ paths:
tags:
- Transactions
options:
deprecated: true
description: Returns an empty response with the HTTP Header "allow" set to the
allowed HTTP verbs
responses:
Expand Down Expand Up @@ -4073,6 +4075,7 @@ paths:
- RenameRules
/v2/transactions:
options:
deprecated: true
description: Returns an empty response with the HTTP Header "allow" set to the
allowed HTTP verbs
responses:
Expand All @@ -4082,6 +4085,7 @@ paths:
tags:
- Transactions
post:
deprecated: true
description: Creates transactions from the list of submitted transaction data.
The response code is the highest response code number that a single transaction
creation would have caused. If it is not equal to 201, at least one transaction
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/transaction_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (co Controller) RegisterTransactionRoutes(r *gin.RouterGroup) {
// @Tags Transactions
// @Success 204
// @Router /v1/transactions [options]
// @Deprecated true
func (co Controller) OptionsTransactionList(c *gin.Context) {
httputil.OptionsGetPost(c)
}
Expand Down Expand Up @@ -193,6 +194,7 @@ func (co Controller) CreateTransaction(c *gin.Context) {
// @Param reconciled query bool false "DEPRECATED. Filter by reconcilication state"
// @Param reconciledSource query bool false "Reconcilication state in source account"
// @Param reconciledDestination query bool false "Reconcilication state in destination account"
// @Deprecated true
func (co Controller) GetTransactions(c *gin.Context) {
var filter TransactionQueryFilterV1
if err := c.Bind(&filter); err != nil {
Expand Down
2 changes: 2 additions & 0 deletions pkg/controllers/transaction_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func (co Controller) RegisterTransactionRoutesV2(r *gin.RouterGroup) {
// @Tags Transactions
// @Success 204
// @Router /v2/transactions [options]
// @Deprecated true
func (co Controller) OptionsTransactionsV2(c *gin.Context) {
httputil.OptionsPost(c)
}
Expand All @@ -71,6 +72,7 @@ func (co Controller) OptionsTransactionsV2(c *gin.Context) {
// @Failure 500 {object} []ResponseTransactionV2
// @Param transactions body []models.TransactionCreate true "Transactions"
// @Router /v2/transactions [post]
// @Deprecated true
func (co Controller) CreateTransactionsV2(c *gin.Context) {
var transactions []models.Transaction

Expand Down

0 comments on commit 4308b38

Please sign in to comment.