You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Reads https://developer.affinity.co/, writes `docs/v2/affinity_api_docs.md`, HTML/state JSON/manifest saved under `tmp/v2/`
29
+
- Reads https://developer.affinity.co/, writes `docs/v2/affinity_api_docs.md` and `docs/v2/openapi.json`, HTML/state JSON/manifest saved under `tmp/v2/`
29
30
- Automatically extracts the embedded Redoc OpenAPI JSON, dereferences `$ref`s, flattens schemas, and injects schema + error appendices
30
31
-`--fail-on-diff` mirrors the v1 behavior (exit 1 when the output differs from what is committed)
31
32
@@ -41,7 +42,7 @@ This repository hosts the automatically generated **Affinity API v1** and **API
41
42
42
43
## Maintenance & Ownership
43
44
44
-
1.**Never edit**`docs/v1/affinity_api_docs.md` or `docs/v2/affinity_api_docs.md` manually. Regenerate via the sync scripts whenever updates are needed.
45
+
1.**Never edit**`docs/v1/affinity_api_docs.md`, `docs/v2/affinity_api_docs.md`, or `docs/v2/openapi.json` manually. Regenerate via the sync scripts whenever updates are needed.
45
46
2.**Quarterly BROKEN_ANCHOR_MAP review:** revisit `BROKEN_ANCHOR_MAP` inside `sync_v1_docs.py`, confirm the live site still requires the overrides, and track the reminder in the quarterly review issue (label `quarterly-review`).
-`docs/v1/affinity_api_docs.md` and `docs/v2/affinity_api_docs.md` are generated—**editing them manually will be reverted** the next time the pipelines run.
96
+
-`docs/v2/openapi.json` is generated—**editing it manually will be reverted** the next time the v2 pipeline runs.
94
97
-`docs/internal/` is gitignored on purpose—keep planning/rollout notes there locally without committing them.
95
98
- The sync header clearly states the unofficial nature of this copy; always cross-check with https://api-docs.affinity.co/.
96
99
-`llms.txt` spells out the guardrails for AI assistants—review it before delegating tasks to LLMs.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
_No changes yet._
11
11
12
-
## [2.0.0] - 2025-11-10
12
+
## [2.1.0] - 2025-12-14
13
+
14
+
### Added
15
+
16
+
- Stable Affinity API v2 OpenAPI spec artifact at `docs/v2/openapi.json` (auto-generated by `tools/v2_sync_pipeline/sync_v2_docs.py`).
17
+
18
+
### Fixed
19
+
20
+
- v2 markdown internal links now point to GitHub-compatible anchors (rewrites Redoc-style fragments during generation).
21
+
- Updated broken API key help-center URL in the v2 markdown output.
22
+
23
+
## [2.0.0] - 2025-12-02
13
24
14
25
### Added
15
26
@@ -25,6 +36,10 @@ _No changes yet._
25
36
- v2 descriptions preserve embedded markdown tables, convert single-cell callout tables into blockquote warnings, and keep filter matrices/notes in sync with the live Redoc formatting.
26
37
- Response schemas now include explicit model names, constraint-aware type strings, cleaner property tables, nested detail links, and a note explaining why live-site request/response samples are not mirrored in the markdown export.
27
38
39
+
### Removed
40
+
41
+
- Legacy `.github/scripts/check_and_update_docs.py` workflow helper in favor of the dedicated v1 and v2 sync pipeline scripts.
Copy file name to clipboardExpand all lines: REPOSITORY_STRUCTURE.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,16 @@ This document explains the repository structure and why files are organized this
33
33
34
34
**Why here?**: Development documentation belongs in `docs/`, separate from user-facing documentation.
35
35
36
+
### `docs/v1/` and `docs/v2/` - Generated Documentation Outputs
37
+
38
+
-**Purpose**: Houses generated artifacts that mirror the official Affinity API documentation.
39
+
-**Key files**:
40
+
-`docs/v1/affinity_api_docs.md` – generated by `tools/v1_sync_pipeline/sync_v1_docs.py`
41
+
-`docs/v2/affinity_api_docs.md` – generated by `tools/v2_sync_pipeline/sync_v2_docs.py`
42
+
-`docs/v2/openapi.json` – generated by `tools/v2_sync_pipeline/sync_v2_docs.py` (stable OpenAPI download)
43
+
44
+
**Why here?**: These are the canonical, committed outputs of the sync pipelines. They should never be edited manually.
45
+
36
46
### `tools/v1_sync_pipeline/` - Production Sync + QA Tooling
37
47
38
48
-**Purpose**: Houses the production-ready sync pipeline and QA scripts
@@ -43,6 +53,16 @@ This document explains the repository structure and why files are organized this
43
53
44
54
**Why here?**: Separates long-lived automation from discarded extraction experiments (`scripts/` directory has been removed).
45
55
56
+
### `tools/v2_sync_pipeline/` - Production v2 Sync Pipeline
57
+
58
+
-**Purpose**: Fetches the Redocly state payload from https://developer.affinity.co/ and generates the v2 markdown mirror + a stable OpenAPI JSON artifact.
59
+
-**Contents**:
60
+
-`sync_v2_docs.py` – Fetches Redoc shell HTML + state JS, extracts OpenAPI JSON, renders markdown, writes outputs under `docs/v2/`
61
+
-`openapi_loader.py` – Discovers the `redocly-state-*.js` asset and extracts the embedded OpenAPI document
62
+
-`markdown_renderer.py` – Converts the OpenAPI spec into readable markdown sections + appendices
63
+
64
+
**Why here?**: Keeps v2 automation co-located with v1, using the same “generated outputs, never hand-edit” approach.
65
+
46
66
### `requirements-ci.txt` - CI Dependencies
47
67
48
68
-**Purpose**: Python dependencies needed for CI/CD workflows
@@ -73,6 +93,7 @@ This document explains the repository structure and why files are organized this
73
93
| Test docs |`docs/development/`| Development docs |
74
94
| CI scripts |`.github/scripts/`| GitHub-specific (only `validate_docs_structure.py` remains) |
75
95
| Sync pipeline |`tools/v1_sync_pipeline/`| Production automation + QA helpers |
96
+
| Sync pipeline (v2) |`tools/v2_sync_pipeline/`| Production automation for v2 docs |
0 commit comments