Skip to content

Commit e23ffb7

Browse files
authored
docs: correct API documentation for import endpoint (#466)
1 parent e7e0e30 commit e23ffb7

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

api/docs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ const docTemplate = `{
17691769
},
17701770
"/v1/import": {
17711771
"post": {
1772-
"description": "Imports data from other sources. Resources with the same name are ignored. Accepts CSV files in the following formats: YNAB Import (use [YNAP](https://ynap.leolabs.org/) to convert your bank statement), YNAB 4 Register export, and YNAB 4 Budget export.",
1772+
"description": "Imports budgets from YNAB 4",
17731773
"consumes": [
17741774
"multipart/form-data"
17751775
],
@@ -1790,7 +1790,7 @@ const docTemplate = `{
17901790
},
17911791
{
17921792
"type": "string",
1793-
"description": "Name of the Budget to create for a YNAB 4 import. Ignored for all other imports",
1793+
"description": "Name of the Budget to create",
17941794
"name": "budgetName",
17951795
"in": "query"
17961796
}

api/swagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,7 @@
17571757
},
17581758
"/v1/import": {
17591759
"post": {
1760-
"description": "Imports data from other sources. Resources with the same name are ignored. Accepts CSV files in the following formats: YNAB Import (use [YNAP](https://ynap.leolabs.org/) to convert your bank statement), YNAB 4 Register export, and YNAB 4 Budget export.",
1760+
"description": "Imports budgets from YNAB 4",
17611761
"consumes": [
17621762
"multipart/form-data"
17631763
],
@@ -1778,7 +1778,7 @@
17781778
},
17791779
{
17801780
"type": "string",
1781-
"description": "Name of the Budget to create for a YNAB 4 import. Ignored for all other imports",
1781+
"description": "Name of the Budget to create",
17821782
"name": "budgetName",
17831783
"in": "query"
17841784
}

api/swagger.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1960,18 +1960,14 @@ paths:
19601960
post:
19611961
consumes:
19621962
- multipart/form-data
1963-
description: 'Imports data from other sources. Resources with the same name
1964-
are ignored. Accepts CSV files in the following formats: YNAB Import (use
1965-
[YNAP](https://ynap.leolabs.org/) to convert your bank statement), YNAB 4
1966-
Register export, and YNAB 4 Budget export.'
1963+
description: Imports budgets from YNAB 4
19671964
parameters:
19681965
- description: File to import
19691966
in: formData
19701967
name: file
19711968
required: true
19721969
type: file
1973-
- description: Name of the Budget to create for a YNAB 4 import. Ignored for
1974-
all other imports
1970+
- description: Name of the Budget to create
19751971
in: query
19761972
name: budgetName
19771973
type: string

pkg/controllers/import.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ func (co Controller) OptionsImport(c *gin.Context) {
3838
}
3939

4040
// @Summary Import
41-
// @Description Imports data from other sources. Resources with the same name are ignored. Accepts CSV files in the following formats: YNAB Import (use [YNAP](https://ynap.leolabs.org/) to convert your bank statement), YNAB 4 Register export, and YNAB 4 Budget export.
41+
// @Description Imports budgets from YNAB 4
4242
// @Tags Import
4343
// @Accept multipart/form-data
4444
// @Produce json
4545
// @Success 204
4646
// @Failure 400 {object} httperrors.HTTPError
4747
// @Failure 500 {object} httperrors.HTTPError
4848
// @Param file formData file true "File to import"
49-
// @Param budgetName query string false "Name of the Budget to create for a YNAB 4 import. Ignored for all other imports"
49+
// @Param budgetName query string false "Name of the Budget to create"
5050
// @Router /v1/import [post]
5151
func (co Controller) Import(c *gin.Context) {
5252
var query ImportQuery

0 commit comments

Comments
 (0)