Skip to content

fix(ui): drop deprecated site info fetch and reload doc on query change - #60

Merged
BatLeDev merged 2 commits into
masterfrom
fix-site-info-hashes
Oct 21, 2026
Merged

BatLeDev merged 2 commits into
masterfrom
fix-site-info-hashes

Conversation

@BatLeDev

Copy link
Copy Markdown
Member

Fix the console warnings seen on staging, keeping the standalone mode working.

  • index.html loads the hashed _theme.css and _public.js from simple-directory (filled by createSpaMiddleware with privateDirectoryUrl, as in catalogs and processings), and createSession no longer uses siteInfo: true, which logged refreshSiteInfo is deprecated. The tags are injected through a {SITE_RESOURCES} template param, empty in standalone mode (useSimpleDirectory: false).
  • The doc is reloaded again when its URL query params change without a page load (e.g. a d-frame parent switching dataset): since Vue Router 5, watch(route.query) was an invalid source and only ran once. The resolved doc URL is watched instead, so operation/params changes still do not refetch the doc.
  • externalDocs and servers props of home.vue are optional, as in OpenAPI.

Heads-up: each index.html request now asks simple-directory for the site hashes (cached 1 min) at PRIVATE_DIRECTORY_URL, which was already required for the session.

… urls

createSession({ siteInfo: true }) fetched _public at startup and logged
'refreshSiteInfo is deprecated'. index.html now loads the hashed _theme.css
and _public.js filled by createSpaMiddleware (privateDirectoryUrl), as in
catalogs and processings. The tags are injected through SITE_RESOURCES,
empty in standalone mode (useSimpleDirectory: false).
Since Vue Router 5 route.query is not reactive, so watch(route.query) was
an invalid source and the doc was never refetched after an in-app query
change (e.g. a d-frame parent switching dataset). Watch the resolved doc
url instead, so operation/params changes still do not refetch it.
Also make home externalDocs and servers props optional, both are
optional in OpenAPI.
@github-actions github-actions Bot added the fix label Oct 21, 2026
@BatLeDev
BatLeDev merged commit 06c5930 into master Oct 21, 2026
4 checks passed
@BatLeDev
BatLeDev deleted the fix-site-info-hashes branch October 21, 2026 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant