feat: add valuations API endpoints for managing account reconciliations (#745)

* feat: add valuations API endpoints for managing account reconciliations

* refactor: formatting

* fix: make account extraction clearer

* feat: validation and error handling improvements

* feat: transaction

* feat: error handling

* Add API documentation LLM context

* Make it easier for people

* feat: transaction in creation

* feat: add OpenAPI spec for Valuations API

* fix: update notes validation to check for key presence

* Prevent double render

* All other docs use `apiKeyAuth`

* More `apiKeyAuth`

* Remove testing assertions from API doc specs

* fix: correct valuation entry references

---------

Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
Pere Montpeó
2026-01-30 18:54:15 +01:00
committed by GitHub
parent 02cd84568e
commit 9f5fdd4d13
16 changed files with 1014 additions and 168 deletions

View File

@@ -0,0 +1,19 @@
# frozen_string_literal: true
json.id valuation.entry.id
json.date valuation.entry.date
json.amount valuation.entry.amount_money.format
json.currency valuation.entry.currency
json.notes valuation.entry.notes
json.kind valuation.kind
# Account information
json.account do
json.id valuation.entry.account.id
json.name valuation.entry.account.name
json.account_type valuation.entry.account.accountable_type.underscore
end
# Additional metadata
json.created_at valuation.created_at.iso8601
json.updated_at valuation.updated_at.iso8601

View File

@@ -0,0 +1,3 @@
# frozen_string_literal: true
json.partial! "valuation", valuation: @valuation