Skip to content

Commit 7c65f21

Browse files
committed
Fix spec and path for PATCH and DELETE on scheduled transactions
1 parent dcc20ba commit 7c65f21

9 files changed

+44
-45
lines changed

.openapi-generator/FILES

-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ pyproject.toml
108108
requirements.txt
109109
test-requirements.txt
110110
test/__init__.py
111-
test/test_put_scheduled_transaction_wrapper.py
112111
tox.ini
113112
ynab/__init__.py
114113
ynab/api/__init__.py

docs/ScheduledTransactionsApi.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ All URIs are relative to *https://api.ynab.com/v1*
55
Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**create_scheduled_transaction**](ScheduledTransactionsApi.md#create_scheduled_transaction) | **POST** /budgets/{budget_id}/scheduled_transactions | Create a single scheduled transaction
8-
[**delete_scheduled_transaction**](ScheduledTransactionsApi.md#delete_scheduled_transaction) | **DELETE** /budgets/{budget_id}/scheduled_transactions | Deletes an existing scheduled transaction
8+
[**delete_scheduled_transaction**](ScheduledTransactionsApi.md#delete_scheduled_transaction) | **DELETE** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Deletes an existing scheduled transaction
99
[**get_scheduled_transaction_by_id**](ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | **GET** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Single scheduled transaction
1010
[**get_scheduled_transactions**](ScheduledTransactionsApi.md#get_scheduled_transactions) | **GET** /budgets/{budget_id}/scheduled_transactions | List scheduled transactions
11-
[**update_scheduled_transaction**](ScheduledTransactionsApi.md#update_scheduled_transaction) | **PUT** /budgets/{budget_id}/scheduled_transactions | Updates an existing scheduled transaction
11+
[**update_scheduled_transaction**](ScheduledTransactionsApi.md#update_scheduled_transaction) | **PUT** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Updates an existing scheduled transaction
1212

1313

1414
# **create_scheduled_transaction**

open_api_spec.yaml

+35-35
Original file line numberDiff line numberDiff line change
@@ -1580,12 +1580,13 @@ paths:
15801580
schema:
15811581
$ref: "#/components/schemas/ErrorResponse"
15821582
x-codegen-request-body-name: data
1583-
put:
1583+
/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}:
1584+
get:
15841585
tags:
15851586
- Scheduled Transactions
1586-
summary: Updates an existing scheduled transaction
1587-
description: Updates a single scheduled transaction
1588-
operationId: updateScheduledTransaction
1587+
summary: Single scheduled transaction
1588+
description: Returns a single scheduled transaction
1589+
operationId: getScheduledTransactionById
15891590
parameters:
15901591
- name: budget_id
15911592
in: path
@@ -1602,34 +1603,31 @@ paths:
16021603
required: true
16031604
schema:
16041605
type: string
1605-
requestBody:
1606-
description: The scheduled transaction to update
1607-
content:
1608-
"application/json":
1609-
schema:
1610-
$ref: "#/components/schemas/PutScheduledTransactionWrapper"
1611-
required: true
16121606
responses:
16131607
"200":
1614-
description: The scheduled transaction was successfully updated
1608+
description: The requested Scheduled Transaction
16151609
content:
16161610
application/json:
16171611
schema:
16181612
$ref: "#/components/schemas/ScheduledTransactionResponse"
1619-
"400":
1620-
description: >-
1621-
The request could not be understood due to malformed syntax or
1622-
validation error(s)
1613+
"404":
1614+
description: The scheduled transaction was not found
16231615
content:
16241616
application/json:
16251617
schema:
16261618
$ref: "#/components/schemas/ErrorResponse"
1627-
delete:
1619+
default:
1620+
description: An error occurred
1621+
content:
1622+
application/json:
1623+
schema:
1624+
$ref: "#/components/schemas/ErrorResponse"
1625+
put:
16281626
tags:
16291627
- Scheduled Transactions
1630-
summary: Deletes an existing scheduled transaction
1631-
description: Deletes a scheduled transaction
1632-
operationId: deleteScheduledTransaction
1628+
summary: Updates an existing scheduled transaction
1629+
description: Updates a single scheduled transaction
1630+
operationId: updateScheduledTransaction
16331631
parameters:
16341632
- name: budget_id
16351633
in: path
@@ -1646,26 +1644,34 @@ paths:
16461644
required: true
16471645
schema:
16481646
type: string
1647+
requestBody:
1648+
description: The scheduled transaction to update
1649+
content:
1650+
"application/json":
1651+
schema:
1652+
$ref: "#/components/schemas/PutScheduledTransactionWrapper"
1653+
required: true
16491654
responses:
16501655
"200":
1651-
description: The scheduled transaction was successfully deleted
1656+
description: The scheduled transaction was successfully updated
16521657
content:
16531658
application/json:
16541659
schema:
16551660
$ref: "#/components/schemas/ScheduledTransactionResponse"
1656-
"404":
1657-
description: The scheduled transaction was not found
1661+
"400":
1662+
description: >-
1663+
The request could not be understood due to malformed syntax or
1664+
validation error(s)
16581665
content:
16591666
application/json:
16601667
schema:
16611668
$ref: "#/components/schemas/ErrorResponse"
1662-
/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}:
1663-
get:
1669+
delete:
16641670
tags:
16651671
- Scheduled Transactions
1666-
summary: Single scheduled transaction
1667-
description: Returns a single scheduled transaction
1668-
operationId: getScheduledTransactionById
1672+
summary: Deletes an existing scheduled transaction
1673+
description: Deletes a scheduled transaction
1674+
operationId: deleteScheduledTransaction
16691675
parameters:
16701676
- name: budget_id
16711677
in: path
@@ -1684,7 +1690,7 @@ paths:
16841690
type: string
16851691
responses:
16861692
"200":
1687-
description: The requested Scheduled Transaction
1693+
description: The scheduled transaction was successfully deleted
16881694
content:
16891695
application/json:
16901696
schema:
@@ -1695,12 +1701,6 @@ paths:
16951701
application/json:
16961702
schema:
16971703
$ref: "#/components/schemas/ErrorResponse"
1698-
default:
1699-
description: An error occurred
1700-
content:
1701-
application/json:
1702-
schema:
1703-
$ref: "#/components/schemas/ErrorResponse"
17041704
components:
17051705
schemas:
17061706
ErrorResponse:

openapi-generator-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
packageName: ynab
2-
packageVersion: 1.2.0
2+
packageVersion: 1.3.0
33
packageDescription: Official Python client for the YNAB API. API documentation available at https://api.ynab.com.
44
licenseInfo:
55
name: Apache-2.0

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ynab"
3-
version = "1.2.0"
3+
version = "1.3.0"
44
description = "Official Python client for the YNAB API. API documentation available at https://api.ynab.com. Generated from server specification version 1.74.0"
55
authors = ["YNAB"]
66
license = "Apache-2.0"

ynab/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
""" # noqa: E501
1515

1616

17-
__version__ = "1.2.0"
17+
__version__ = "1.3.0"
1818

1919
# import apis into sdk package
2020
from ynab.api.accounts_api import AccountsApi

ynab/api/scheduled_transactions_api.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def _delete_scheduled_transaction_serialize(
597597

598598
return self.api_client.param_serialize(
599599
method='DELETE',
600-
resource_path='/budgets/{budget_id}/scheduled_transactions',
600+
resource_path='/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}',
601601
path_params=_path_params,
602602
query_params=_query_params,
603603
header_params=_header_params,
@@ -1464,7 +1464,7 @@ def _update_scheduled_transaction_serialize(
14641464

14651465
return self.api_client.param_serialize(
14661466
method='PUT',
1467-
resource_path='/budgets/{budget_id}/scheduled_transactions',
1467+
resource_path='/budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id}',
14681468
path_params=_path_params,
14691469
query_params=_query_params,
14701470
header_params=_header_params,

ynab/api_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
self.default_headers[header_name] = header_value
9191
self.cookie = cookie
9292
# Set default User-Agent.
93-
self.user_agent = 'OpenAPI-Generator/1.2.0/python'
93+
self.user_agent = 'OpenAPI-Generator/1.3.0/python'
9494
self.client_side_validation = configuration.client_side_validation
9595

9696
def __enter__(self):

ynab/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def to_debug_report(self) -> str:
510510
"OS: {env}\n"\
511511
"Python Version: {pyversion}\n"\
512512
"Version of the API: 1.74.0\n"\
513-
"SDK Package Version: 1.2.0".\
513+
"SDK Package Version: 1.3.0".\
514514
format(env=sys.platform, pyversion=sys.version)
515515

516516
def get_host_settings(self) -> List[HostSetting]:

0 commit comments

Comments
 (0)