Skip to content

infra: normalize swagger servers[] to the production URL in download_swagger.py#56

Open
bzajzon-laserfiche wants to merge 1 commit into
mainfrom
infra/localhost-trap-normalize
Open

infra: normalize swagger servers[] to the production URL in download_swagger.py#56
bzajzon-laserfiche wants to merge 1 commit into
mainfrom
infra/localhost-trap-normalize

Conversation

@bzajzon-laserfiche

Copy link
Copy Markdown
Contributor

Regen-tooling fix for the recurring localhost-baking trap: regenerating against a local server bakes http://localhost:11211 into the swagger servers[] and thus every generated client baseUrl default, requiring a manual restore on each regen.

download_swagger.py now forces servers[] to the canonical production URL by default (--canonical-server-url; pass an empty string to keep the source URL). The generated client continues to default baseUrl to production; a local host is used only when a client is explicitly constructed with one (as the integration tests do).

Split out of the 6.4.B/C/D feature work (#55) per the 'infra fix ships in its own PR' convention — tooling-only, no change to the published client surface.

…swagger.py

Regenerating against a local server baked localhost:11211 into the swagger
servers[] and thus every generated client baseUrl default (the recurring
localhost-baking trap), requiring a manual restore each regen.
download_swagger.py now forces servers[] to the canonical production URL by
default (--canonical-server-url; pass an empty string to keep the source).
index.ts now always defaults baseUrl to production; a local host is used only
when a client is constructed with it explicitly (as the integration tests do).
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