REPL: prefer OpenAPI paths in completer and split lookup logic#1881
Merged
pmcelhaney merged 3 commits intomainfrom Apr 16, 2026
Merged
REPL: prefer OpenAPI paths in completer and split lookup logic#1881pmcelhaney merged 3 commits intomainfrom
pmcelhaney merged 3 commits intomainfrom
Conversation
Copilot
AI
changed the title
[WIP] Update completer in REPL to use OpenAPI
REPL: prefer OpenAPI paths in completer and split lookup logic
Apr 15, 2026
pmcelhaney
approved these changes
Apr 16, 2026
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
REPL route autocomplete now prefers OpenAPI path templates (when available) instead of registry-derived paths, so completions reflect canonical spec routes like
/example/hello/{name}. The completer logic was also decomposed into focused lookup helpers to make behavior explicit and easier to evolve.Route source selection
Completer decomposition
createCompleter()into dedicated helpers for:.scenariocompletionsCoverage + docs
Original Prompt
The completer in the REPL currently relies on registry to get a list of valid routes. If an OpenAPI document is available, it should rely on that instead.
Break up the createCompleter() function -- delegate each lookup to a smaller function.
The completer should know about the prefix "/example/hello/{name}" not "/hello/name".
Manual acceptance tests
client.get("/example/hin REPL and pressing Tab suggests/example/hello/{name}.route("/example/hand pressing Tab suggests/example/hello/{name}.route("/pets").still suggests RouteBuilder methods (method(,query(,send(, etc.)..scenariocompletion still suggests index exports and file-prefix/function combinations as before.Tasks
createCompleter()into focused helper functions for each completion domain.openApiDocument.paths), with registry fallback.startRepl()completer wiring to pass the OpenAPI document intocreateCompleter().