Repository navigation
Add An Endpoint Coverage Report - #68
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F3kiLMJnzAVUr7s39h94MK
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.
Summary
There was no way to see which of FreeAgent's documented endpoints the spec covers. This adds a
coveragecommand toFreeAgentToolsand amake coveragetarget that prints its report.FreeAgentTools coverage --output <path>writes a Markdown report.--root(defaultopenapi/openapi.yaml)and
--docs(defaulthttps://dev.freeagent.com/docs) can be changed.make coveragewrites it to.build/coverage.md(COVERAGE_REPORT_PATHoverrides) and prints it.How It Works
METHOD https://api.freeagent.com/v2/...line that starts a code block, with any query string dropped.pathsinopenapi.yaml, following each path file's$ref.:id, the spec's{id}and a numeric example ID (the Notespage's
/v2/notes/1) are the same placeholder.Introduction and How To Guides pages, which repeat other pages' examples, drop out.
The report has a summary line, a table of pages, the missing endpoints by page, and the spec endpoints no page
documents.
Known Trade-Off
The docs' own path errors show on both sides rather than being matched. The documented
DELETE /v2/price_list_item/:idis a 404, so it is listed as missing, and the workingDELETE /v2/price_list_items/{id}is listed as not in the docs. The task delete, which the docs give as/v2/users/:id, appears the same way. Marking these as known errors would need a hand-kept list.Code
CoverageCommandfetches the index and every page concurrently and writes the report.Endpoint(method, path and the matching key),DocsPage(reads the index links and a page'sendpoints),
SpecPaths(reads the spec's operations) andCoverageReport(the comparison and its Markdown).FreeAgentToolsis now anAsyncParsableCommand, andSpecGraph.node(at:in:)is no longer private, soSpecPathscan follow a$refpointer.URLSessioncomes fromFoundationNetworkingon Linux.Tests
operations through a
$refand inline, and the report's sections, grouping, undocumented list and Markdown.swift:6.4.0-noble: the same report, and the tools tests pass on Linux.openapi/change, so no integration suite runs.🤖 Generated with Claude Code
https://claude.ai/code/session_01F3kiLMJnzAVUr7s39h94MK