Document the remaining undocumented v1 read endpoints#17
Open
qmarquez wants to merge 1 commit into
Open
Conversation
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>
|
Tick the box to add this pull request to the merge queue (same as
|
Member
|
Nice work. Do me a favor and drop |
Member
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #16 and discussion #12380. This documents the remaining
v1GET endpoints that exist inroutes/api.phpbut were missing from the spec.I did a method-level diff of
routes/api.php(ondevelop) againstdist/firefly-iii-develop-v1.yaml. After excluding routes that are commented out in the source (e.g. theuser-groupsandavailable-budgetswrite endpoints), these five GET endpoints were the only ones left undocumented:Endpoints
GET /currencies/defaultmodels/transaction-currency.yamlCurrencySingle(alias of/currencies/primary)GET /currencies/{code}/cermodels/transaction-currency-list.yamlCurrencyExchangeRateArrayGET /piggy-banks/{id}/accountsmodels/piggy-bank-list.yamlAccountArrayGET /rules/validate-expressionmodels/rule.yaml{ valid: boolean }(+ 422 on invalid)GET /search/transactions/countsearch/search.yaml{ count: integer }Notes
develop(ShowController@showPrimary,ListController@cer,ListController@accounts,ExpressionController@validateExpression,Search\TransactionController@count).operationIds are unique acrosssrc/.api-docs-generatorlocally (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-groupsmembership endpoints I mentioned are actually commented out inroutes/api.php, so they are not active and are intentionally not included here.