Add required properties to objects
This commit is contained in:
parent
ff093b59d5
commit
b9c51c9dbf
@ -13,14 +13,14 @@ type Transaction struct {
|
|||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Value float64 `json:"value"`
|
Value float64 `json:"value"`
|
||||||
Category string `json:"category"`
|
Category string `json:"category,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bank struct represents a bank
|
// Bank struct represents a bank
|
||||||
type Bank struct {
|
type Bank struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
NordigenID string `json:"nordigenId"`
|
NordigenID string `json:"nordigenId,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResponseError struct represents an error response
|
// ResponseError struct represents an error response
|
||||||
|
|||||||
@ -132,6 +132,11 @@ components:
|
|||||||
format: float
|
format: float
|
||||||
category:
|
category:
|
||||||
type: string
|
type: string
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- date
|
||||||
|
- description
|
||||||
|
- value
|
||||||
Transactions:
|
Transactions:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -146,6 +151,9 @@ components:
|
|||||||
nordigenId:
|
nordigenId:
|
||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
|
required:
|
||||||
|
- id
|
||||||
|
- name
|
||||||
Banks:
|
Banks:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user