Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make draft file responses partial #99

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/great-flies-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@accounter-toolkit/green-invoice-graphql': patch
---

Make Expense fields over draft response optional
33 changes: 20 additions & 13 deletions packages/green-invoice-graphql/src/json-schemas/greenInvoice.json
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,24 @@
]
},
"Expense": {
"allOf": [
{ "$ref": "#/definitions/ExpensePartial" },
{
"required": [
"currency",
"vat",
"amount",
"date",
"reportingDate",
"documentType",
"number",
"supplier",
"accountingClassification"
]
}
]
},
"ExpensePartial": {
"type": "object",
"additionalProperties": false,
"description": "A Single Expense",
Expand Down Expand Up @@ -743,18 +761,7 @@
"type": "boolean",
"description": "Should we save the accounting classification (by setting this to true you are required to add an accounting classification that contains title & irsCode)"
}
},
"required": [
"currency",
"vat",
"amount",
"date",
"reportingDate",
"documentType",
"number",
"supplier",
"accountingClassification"
]
}
},
"GetExpense": {
"type": "object",
Expand Down Expand Up @@ -895,7 +902,7 @@
"description": "The last update date of the expense draft, in UNIX timestamp format"
},
"expense": {
"$ref": "#/definitions/Expense"
"$ref": "#/definitions/ExpensePartial"
},
"thumbnail": {
"type": "string",
Expand Down