Add required properties to objects

This commit is contained in:
Luís Murta 2024-02-05 23:21:18 +00:00
parent ff093b59d5
commit b9c51c9dbf
Signed by: satprog
GPG Key ID: 169EF1BBD7049F94
2 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -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: