diff --git a/cmd/api-server/main.go b/cmd/api-server/main.go index 72d652f..a0be3fd 100644 --- a/cmd/api-server/main.go +++ b/cmd/api-server/main.go @@ -13,14 +13,14 @@ type Transaction struct { Date string `json:"date"` Description string `json:"description"` Value float64 `json:"value"` - Category string `json:"category"` + Category string `json:"category,omitempty"` } // Bank struct represents a bank type Bank struct { ID string `json:"id"` Name string `json:"name"` - NordigenID string `json:"nordigenId"` + NordigenID string `json:"nordigenId,omitempty"` } // ResponseError struct represents an error response diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 16f1c6b..ead13b4 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -132,6 +132,11 @@ components: format: float category: type: string + required: + - id + - date + - description + - value Transactions: type: array items: @@ -146,6 +151,9 @@ components: nordigenId: type: string format: uuid + required: + - id + - name Banks: type: array items: