feat(go): M5.1 — hand-author /api/* wire types + JSON Schemas
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s
All checks were successful
Deploy to K8s / deploy (push) Successful in 7s
Add internal/web/api package with Go structs for every /api/X route:
AdultsResponse, JuniorsResponse, PaymentsResponse, VersionResponse.
All fields carry explicit json: tags matching the Python view-model keys.
Key design choices:
- member_data / month_labels / raw_payments are nested objects (not
the pre-serialised JSON strings used in Jinja templates)
- Expected{Value int; Unknown bool} with custom MarshalJSON emits int
or the string "?" for junior single-attendance months
- RawTransaction covers the full 11-column payments sheet row
schemagen_test.go reflects all four response types via
github.com/invopop/jsonschema and golden-compares against committed
schemas in tests/fixtures/api-schema/. The JSONSchema() method on
Expected lives in the test file so the prod binary has no jsonschema
dependency.
Closes M5.1 in docs/plans/2026-05-03-2349-go-backend-rewrite-progress.md.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
399
go/tests/fixtures/api-schema/adults.schema.json
vendored
Normal file
399
go/tests/fixtures/api-schema/adults.schema.json
vendored
Normal file
@@ -0,0 +1,399 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$ref": "#/$defs/AdultsResponse",
|
||||
"$defs": {
|
||||
"AdultsMemberData": {
|
||||
"properties": {
|
||||
"tier": {
|
||||
"type": "string"
|
||||
},
|
||||
"months": {
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/AdultsMonthData"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"other_transactions": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/MemberOtherEntry"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"total_balance": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tier",
|
||||
"months",
|
||||
"other_transactions",
|
||||
"total_balance"
|
||||
]
|
||||
},
|
||||
"AdultsMonthData": {
|
||||
"properties": {
|
||||
"expected": {
|
||||
"type": "integer"
|
||||
},
|
||||
"original_expected": {
|
||||
"type": "integer"
|
||||
},
|
||||
"attendance_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"exception": {
|
||||
"$ref": "#/$defs/ExceptionData"
|
||||
},
|
||||
"paid": {
|
||||
"type": "number"
|
||||
},
|
||||
"transactions": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/MemberTxEntry"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"expected",
|
||||
"original_expected",
|
||||
"attendance_count",
|
||||
"exception",
|
||||
"paid",
|
||||
"transactions"
|
||||
]
|
||||
},
|
||||
"AdultsResponse": {
|
||||
"properties": {
|
||||
"months": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"raw_months": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"results": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/MemberRow"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"totals": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/TotalCell"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"member_data": {
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/AdultsMemberData"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"month_labels": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"raw_payments": {
|
||||
"additionalProperties": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/RawTransaction"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"credits": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/Credit"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"debts": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/Credit"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"unmatched": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/RawTransaction"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"attendance_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"payments_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"bank_account": {
|
||||
"type": "string"
|
||||
},
|
||||
"current_month": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"months",
|
||||
"raw_months",
|
||||
"results",
|
||||
"totals",
|
||||
"member_data",
|
||||
"month_labels",
|
||||
"raw_payments",
|
||||
"credits",
|
||||
"debts",
|
||||
"unmatched",
|
||||
"attendance_url",
|
||||
"payments_url",
|
||||
"bank_account",
|
||||
"current_month"
|
||||
]
|
||||
},
|
||||
"Credit": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"amount"
|
||||
]
|
||||
},
|
||||
"ExceptionData": {
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"note"
|
||||
]
|
||||
},
|
||||
"MemberOtherEntry": {
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"sender": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string"
|
||||
},
|
||||
"confidence": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"date",
|
||||
"sender",
|
||||
"message",
|
||||
"purpose",
|
||||
"confidence"
|
||||
]
|
||||
},
|
||||
"MemberRow": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"months": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/MonthCell"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"balance": {
|
||||
"type": "integer"
|
||||
},
|
||||
"unpaid_periods": {
|
||||
"type": "string"
|
||||
},
|
||||
"raw_unpaid_periods": {
|
||||
"type": "string"
|
||||
},
|
||||
"payable_amount": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"months",
|
||||
"balance",
|
||||
"unpaid_periods",
|
||||
"raw_unpaid_periods",
|
||||
"payable_amount"
|
||||
]
|
||||
},
|
||||
"MemberTxEntry": {
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"sender": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"confidence": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"date",
|
||||
"sender",
|
||||
"message",
|
||||
"confidence"
|
||||
]
|
||||
},
|
||||
"MonthCell": {
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"overridden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"month": {
|
||||
"type": "string"
|
||||
},
|
||||
"raw_month": {
|
||||
"type": "string"
|
||||
},
|
||||
"tooltip": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"text",
|
||||
"overridden",
|
||||
"status",
|
||||
"amount",
|
||||
"month",
|
||||
"raw_month",
|
||||
"tooltip"
|
||||
]
|
||||
},
|
||||
"RawTransaction": {
|
||||
"properties": {
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"manual_fix": {
|
||||
"type": "string"
|
||||
},
|
||||
"person": {
|
||||
"type": "string"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string"
|
||||
},
|
||||
"inferred_amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"sender": {
|
||||
"type": "string"
|
||||
},
|
||||
"vs": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"bank_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sync_id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"date",
|
||||
"amount",
|
||||
"manual_fix",
|
||||
"person",
|
||||
"purpose",
|
||||
"inferred_amount",
|
||||
"sender",
|
||||
"vs",
|
||||
"message",
|
||||
"bank_id",
|
||||
"sync_id"
|
||||
]
|
||||
},
|
||||
"TotalCell": {
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"text",
|
||||
"status"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
411
go/tests/fixtures/api-schema/juniors.schema.json
vendored
Normal file
411
go/tests/fixtures/api-schema/juniors.schema.json
vendored
Normal file
@@ -0,0 +1,411 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$ref": "#/$defs/JuniorsResponse",
|
||||
"$defs": {
|
||||
"Credit": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"amount"
|
||||
]
|
||||
},
|
||||
"ExceptionData": {
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"note"
|
||||
]
|
||||
},
|
||||
"Expected": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"?"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"JuniorsMemberData": {
|
||||
"properties": {
|
||||
"tier": {
|
||||
"type": "string"
|
||||
},
|
||||
"months": {
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/JuniorsMonthData"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"other_transactions": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/MemberOtherEntry"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"total_balance": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tier",
|
||||
"months",
|
||||
"other_transactions",
|
||||
"total_balance"
|
||||
]
|
||||
},
|
||||
"JuniorsMonthData": {
|
||||
"properties": {
|
||||
"expected": {
|
||||
"$ref": "#/$defs/Expected"
|
||||
},
|
||||
"original_expected": {
|
||||
"$ref": "#/$defs/Expected"
|
||||
},
|
||||
"attendance_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"exception": {
|
||||
"$ref": "#/$defs/ExceptionData"
|
||||
},
|
||||
"paid": {
|
||||
"type": "number"
|
||||
},
|
||||
"transactions": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/MemberTxEntry"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"expected",
|
||||
"original_expected",
|
||||
"attendance_count",
|
||||
"exception",
|
||||
"paid",
|
||||
"transactions"
|
||||
]
|
||||
},
|
||||
"JuniorsResponse": {
|
||||
"properties": {
|
||||
"months": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"raw_months": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"results": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/MemberRow"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"totals": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/TotalCell"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"member_data": {
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/JuniorsMemberData"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"month_labels": {
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"raw_payments": {
|
||||
"additionalProperties": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/RawTransaction"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"credits": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/Credit"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"debts": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/Credit"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"unmatched": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/RawTransaction"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"attendance_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"payments_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"bank_account": {
|
||||
"type": "string"
|
||||
},
|
||||
"current_month": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"months",
|
||||
"raw_months",
|
||||
"results",
|
||||
"totals",
|
||||
"member_data",
|
||||
"month_labels",
|
||||
"raw_payments",
|
||||
"credits",
|
||||
"debts",
|
||||
"unmatched",
|
||||
"attendance_url",
|
||||
"payments_url",
|
||||
"bank_account",
|
||||
"current_month"
|
||||
]
|
||||
},
|
||||
"MemberOtherEntry": {
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"sender": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string"
|
||||
},
|
||||
"confidence": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"date",
|
||||
"sender",
|
||||
"message",
|
||||
"purpose",
|
||||
"confidence"
|
||||
]
|
||||
},
|
||||
"MemberRow": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"months": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/MonthCell"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"balance": {
|
||||
"type": "integer"
|
||||
},
|
||||
"unpaid_periods": {
|
||||
"type": "string"
|
||||
},
|
||||
"raw_unpaid_periods": {
|
||||
"type": "string"
|
||||
},
|
||||
"payable_amount": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"months",
|
||||
"balance",
|
||||
"unpaid_periods",
|
||||
"raw_unpaid_periods",
|
||||
"payable_amount"
|
||||
]
|
||||
},
|
||||
"MemberTxEntry": {
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"sender": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"confidence": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"amount",
|
||||
"date",
|
||||
"sender",
|
||||
"message",
|
||||
"confidence"
|
||||
]
|
||||
},
|
||||
"MonthCell": {
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"overridden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"month": {
|
||||
"type": "string"
|
||||
},
|
||||
"raw_month": {
|
||||
"type": "string"
|
||||
},
|
||||
"tooltip": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"text",
|
||||
"overridden",
|
||||
"status",
|
||||
"amount",
|
||||
"month",
|
||||
"raw_month",
|
||||
"tooltip"
|
||||
]
|
||||
},
|
||||
"RawTransaction": {
|
||||
"properties": {
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"manual_fix": {
|
||||
"type": "string"
|
||||
},
|
||||
"person": {
|
||||
"type": "string"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string"
|
||||
},
|
||||
"inferred_amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"sender": {
|
||||
"type": "string"
|
||||
},
|
||||
"vs": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"bank_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sync_id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"date",
|
||||
"amount",
|
||||
"manual_fix",
|
||||
"person",
|
||||
"purpose",
|
||||
"inferred_amount",
|
||||
"sender",
|
||||
"vs",
|
||||
"message",
|
||||
"bank_id",
|
||||
"sync_id"
|
||||
]
|
||||
},
|
||||
"TotalCell": {
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"text",
|
||||
"status"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
91
go/tests/fixtures/api-schema/payments.schema.json
vendored
Normal file
91
go/tests/fixtures/api-schema/payments.schema.json
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$ref": "#/$defs/PaymentsResponse",
|
||||
"$defs": {
|
||||
"PaymentsResponse": {
|
||||
"properties": {
|
||||
"grouped_payments": {
|
||||
"additionalProperties": {
|
||||
"items": {
|
||||
"$ref": "#/$defs/RawTransaction"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"sorted_people": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"attendance_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"payments_url": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"grouped_payments",
|
||||
"sorted_people",
|
||||
"attendance_url",
|
||||
"payments_url"
|
||||
]
|
||||
},
|
||||
"RawTransaction": {
|
||||
"properties": {
|
||||
"date": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"manual_fix": {
|
||||
"type": "string"
|
||||
},
|
||||
"person": {
|
||||
"type": "string"
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string"
|
||||
},
|
||||
"inferred_amount": {
|
||||
"type": "number"
|
||||
},
|
||||
"sender": {
|
||||
"type": "string"
|
||||
},
|
||||
"vs": {
|
||||
"type": "string"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"bank_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"sync_id": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"date",
|
||||
"amount",
|
||||
"manual_fix",
|
||||
"person",
|
||||
"purpose",
|
||||
"inferred_amount",
|
||||
"sender",
|
||||
"vs",
|
||||
"message",
|
||||
"bank_id",
|
||||
"sync_id"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
26
go/tests/fixtures/api-schema/version.schema.json
vendored
Normal file
26
go/tests/fixtures/api-schema/version.schema.json
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$ref": "#/$defs/VersionResponse",
|
||||
"$defs": {
|
||||
"VersionResponse": {
|
||||
"properties": {
|
||||
"tag": {
|
||||
"type": "string"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string"
|
||||
},
|
||||
"build_date": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": [
|
||||
"tag",
|
||||
"commit",
|
||||
"build_date"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user