Skip to content

Document the remaining undocumented v1 read endpoints#17

Open
qmarquez wants to merge 1 commit into
firefly-iii:mainfrom
qmarquez:docs/remaining-v1-read-endpoints
Open

Document the remaining undocumented v1 read endpoints#17
qmarquez wants to merge 1 commit into
firefly-iii:mainfrom
qmarquez:docs/remaining-v1-read-endpoints

Conversation

@qmarquez

Copy link
Copy Markdown
Contributor

Follow-up to #16 and discussion #12380. This documents the remaining v1 GET endpoints that exist in routes/api.php but were missing from the spec.

I did a method-level diff of routes/api.php (on develop) against dist/firefly-iii-develop-v1.yaml. After excluding routes that are commented out in the source (e.g. the user-groups and available-budgets write endpoints), these five GET endpoints were the only ones left undocumented:

Endpoints

Endpoint File Response
GET /currencies/default models/transaction-currency.yaml CurrencySingle (alias of /currencies/primary)
GET /currencies/{code}/cer models/transaction-currency-list.yaml CurrencyExchangeRateArray
GET /piggy-banks/{id}/accounts models/piggy-bank-list.yaml AccountArray
GET /rules/validate-expression models/rule.yaml inline { valid: boolean } (+ 422 on invalid)
GET /search/transactions/count search/search.yaml inline { count: integer }

Notes

  • Response shapes were verified against the controllers on develop (ShowController@showPrimary, ListController@cer, ListController@accounts, ExpressionController@validateExpression, Search\TransactionController@count).
  • The two non-standard responses use inline object schemas since they do not map to an existing component schema.
  • All five operationIds are unique across src/.
  • This time I ran api-docs-generator locally (PHP 8.4): the stitched output builds cleanly and includes all five paths.

This should close the gap from the discussion. A small correction to my earlier comment there: the user-groups membership endpoints I mentioned are actually commented out in routes/api.php, so they are not active and are intentionally not included here.

Adds OpenAPI source partials for five GET endpoints that exist in
routes/api.php but were missing from the spec:

- GET /currencies/default (alias of /currencies/primary)
- GET /currencies/{code}/cer (currency exchange rates)
- GET /piggy-banks/{id}/accounts
- GET /rules/validate-expression
- GET /search/transactions/count

Response shapes verified against the controllers on `develop`. The two
non-standard responses (validate-expression -> {valid: bool},
transactions/count -> {count: int}) are documented with inline schemas.

Validated by running api-docs-generator: the stitched output builds
cleanly and includes all five paths.

See discussion: https://github.com/orgs/firefly-iii/discussions/12380

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@qmarquez qmarquez requested review from JC5 and SDx3 as code owners June 30, 2026 18:13
@mergify

mergify Bot commented Jun 30, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request
@JC5

JC5 commented Jun 30, 2026

Copy link
Copy Markdown
Member

Nice work. Do me a favor and drop GET /currencies/default, it's there for backwards compatibility with the data importer but it will be removed one of these days.

@JC5

JC5 commented Jun 30, 2026

Copy link
Copy Markdown
Member

The two non-standard responses use inline object schemas since they do not map to an existing component schema.

Nice work on this set of endpoints, I appreciate it. I'll pick up the object schemas and make sure the docs are built again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants