Skip to content

fix(api-explorer): restore Base URL editing for single-server API specs#971

Merged
jth-nw merged 2 commits into
mainfrom
dev
May 20, 2026
Merged

fix(api-explorer): restore Base URL editing for single-server API specs#971
jth-nw merged 2 commits into
mainfrom
dev

Conversation

@jth-nw
Copy link
Copy Markdown
Collaborator

@jth-nw jth-nw commented May 20, 2026

No description provided.

DanPiazza-Netwrix and others added 2 commits May 20, 2026 13:36
The swizzled Server component only showed the URL dropdown when
options.length > 1, leaving the edit form empty for APIs with a single
server URL. Clicking Edit showed nothing but a Done button.

- Add src/theme/ApiExplorer/Server/slice.ts (swizzled) with a new
  setCustomServerUrl action that sets state.value.url directly without
  requiring a match in state.options, enabling free-form URL editing
- Show a FormTextInput (local draft state) when options.length === 1,
  dispatching setCustomServerUrl on Done
- Guard the stale-URL reset so custom URLs aren't immediately
  overwritten (only resets when options.length > 1)
- Always show Reset to default, not just when variables are present
- Add type="button" to Reset and Done buttons so pressing Enter in the
  URL field no longer accidentally triggers Reset to default

Generated with AI

Co-Authored-By: Claude Code <ai@netwrix.com>
fix(api-explorer): restore Base URL editing for single-server API specs
@jth-nw jth-nw merged commit f873ed2 into main May 20, 2026
3 checks passed
@jth-nw jth-nw deployed to development May 20, 2026 18:15 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants