Repository navigation
fix(spec): add a concrete server URL so request examples render - #362
Merged
jackye1995 merged 2 commits intoAug 30, 2026
Merged
Conversation
Every entry in `servers` was templated. Documentation renderers and API consoles substitute no variables in that case, so they cannot construct a request URL and print an error where each endpoint's code samples belong. On docs.lancedb.com this leaves 43-48 of the 55 REST reference pages showing "A valid request URL is required to generate request examples" instead of cURL/Python/JavaScript samples, and which pages fail varies between builds. The pages that do render emit the unsubstituted template as the URL. Adding a concrete server ahead of the templated ones fixes all 55. The templated entries stay, so a configurable base URL is still available.
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.
Every entry in
serversis templated ({scheme}://{host}:{port}/{basePath}). Documentation renderers and API consoles substitute no variables in that case, so they cannot construct a request URL and print an error where each endpoint's code samples belong.On docs.lancedb.com this currently leaves 43–48 of the 55 REST reference pages showing "A valid request URL is required to generate request examples" instead of cURL/Python/JavaScript samples. Which pages fail varies between builds, and the pages that do render emit the unsubstituted template as the request URL:
Adding a concrete server ahead of the templated ones resolves it. Verified end to end by building the docs site against the patched spec: all 55 endpoint pages render examples, with real URLs (
http://localhost:2333/v1/table).The templated entries are kept, so a configurable base URL remains available.
http://localhost:2333matches what the first templated server already resolves to from its own defaults, so the effective default is unchanged apart from dropping a trailing slash that produced//v1/...in generated paths.make lint(openapi-spec-validator --errors all) passes.