|
6 | 6 | import textwrap |
7 | 7 | from dataclasses import dataclass |
8 | 8 | from datetime import datetime |
| 9 | +from pathlib import Path |
9 | 10 | from typing import Any, Dict, Iterable, List, Tuple |
10 | 11 |
|
11 | 12 | from .utils import build_toc, normalize_whitespace, format_description, fix_mojibake, slugify |
@@ -241,6 +242,7 @@ def build(self) -> str: |
241 | 242 | def _render_header(self, toc: str) -> str: |
242 | 243 | long_ts = self.ctx.fetched_at.strftime("%B %d, %Y at %H:%M:%S %Z") |
243 | 244 | short_ts = self.ctx.fetched_at.strftime("%m/%d/%Y %H:%M:%S %Z") |
| 245 | + snapshot_label = Path(self.ctx.snapshot_path).name if self.ctx.snapshot_path else "N/A" |
244 | 246 | lines = [ |
245 | 247 | "# Affinity API v2 Documentation (Auto-synced)", |
246 | 248 | "", |
@@ -269,7 +271,7 @@ def _render_header(self, toc: str) -> str: |
269 | 271 | "> **Note:** The live site renders dynamic multi-language request/response samples in-browser. Because those snippets are generated at runtime and are not embedded in the OpenAPI payload, they cannot be mirrored here. Refer to https://developer.affinity.co/ for the full interactive samples.", |
270 | 272 | "", |
271 | 273 | f"**Documentation Version:** This copy is based on the official documentation as it appeared on **{long_ts}** (Last updated: {short_ts}).", |
272 | | - f"**Snapshot:** `{self.ctx.snapshot_path}`", |
| 274 | + f"**Snapshot:** Captured HTML `{snapshot_label}` (archived with the sync artifacts for QA).", |
273 | 275 | "", |
274 | 276 | "> **⚠️ Use at Your Own Risk**", |
275 | 277 | ">", |
|
0 commit comments