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
Copy file name to clipboardExpand all lines: .github/prompts/author-api-docs/deprecate-retire.md
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -214,10 +214,15 @@ Retirement is the final stage of the API lifecycle — the deprecated API has re
214
214
215
215
### Inputs for retirement
216
216
217
-
The Documentation Plan must explicitly identify:
218
-
- Which resources (entity types, complex types) are being retired (marked as "Deleted" or "Removed")
219
-
- Which API operation files are linked to the retired resources
220
-
-**Dependency analysis for related types:** Complex types referenced as property return types and entity types referenced as relationship targets must be explicitly called out. The Documentation Plan must state whether each related type is also being retired or should be retained.
217
+
Retirement can be triggered by:
218
+
-**Schema change:** A Documentation Plan or changelog showing `ChangeType: "Deletion"` for entities, complex types, properties, relationships, actions, or functions
219
+
-**Endpoint removal:** The product stops supporting an endpoint — this may not appear in the schema. The author will specify which endpoints are removed and the affected version(s).
220
+
221
+
The Documentation Plan or author prompt must identify:
222
+
- Which resources (entity types, complex types) are being retired
223
+
- Which version(s): beta, v1.0, or both
224
+
- The alternative API or resource (for redirects)
225
+
-**Dependency analysis for related types:** Complex types referenced as property return types and entity types referenced as relationship targets may still be in use by other APIs. Only delete a related type if it is explicitly called out as retired — otherwise retain it.
221
226
222
227
### Retirement workflow
223
228
@@ -242,11 +247,14 @@ Based on the Documentation Plan, delete:
242
247
3.**Permission include files** for the retired API operation files:
243
248
-`api-reference/{version}/includes/permissions/{operation}-permissions.md` (naming may vary — match the include reference in each API operation file)
244
249
245
-
4.**Complex type files** explicitly called out as retired/deleted in the Documentation Plan:
250
+
4.**RBAC include files** for the retired API operation files (if they exist and not in use by other APIs):
251
+
-`api-reference/{version}/includes/rbac-for-apis/{rbac-file}.md` (match the include reference in each API operation file)
252
+
253
+
5.**Complex type files** explicitly called out as retired/deleted in the Documentation Plan:
246
254
- Only delete if the Documentation Plan explicitly marks the complex type as retired/deleted
247
255
- If not explicitly called out as retired, retain the file
248
256
249
-
5.**Enum files or sections** explicitly called out as retired/deleted in the Documentation Plan:
257
+
6.**Enum files or sections** explicitly called out as retired/deleted in the Documentation Plan:
250
258
- For standalone enum files: delete if explicitly marked as retired
251
259
- For H3 sections in parent resources: removed when parent resource is deleted
252
260
- For entries in global enums files (`enums.md`, `enums-{subnamespace}.md`): remove the enum section
@@ -277,12 +285,12 @@ Add redirects for **resource files that include Methods tables** (entity types)
Copy file name to clipboardExpand all lines: .github/prompts/review-api-docs.prompt.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -208,6 +208,18 @@ When reviewing resources that are part of a polymorphic hierarchy (base types wi
208
208
209
209
Full rules: [common.md — Cross-file consistency validation](./author-api-docs/common.md#cross-file-consistency-validation) (point d) and [public-preview.md — Handling polymorphic entity types](./author-api-docs/public-preview.md#handling-polymorphic-entity-types)
210
210
211
+
### Retirement (file deletion) review
212
+
213
+
When a PR deletes API documentation files, validate:
214
+
-**Completeness:** All API operation files, permission includes, and RBAC includes tied to a deleted entity type resource are also deleted
215
+
-**Retained types:** Complex types and entity types referenced by the deleted resource are NOT deleted unless explicitly called out — they may be in use by other APIs
216
+
-**Reference cleanup:** Deleted resources are removed from Methods tables, Relationships tables, and Properties tables in parent/related resource files
217
+
-**Redirects:** Each deleted entity type resource file and API operation file has a redirect entry in the latest `.openpublishing.redirection.yyyy-mm.json` file in `redirects/`
218
+
-**TOC:** Entries for deleted files removed from `toc.mapping.json`
219
+
-**Changelog and What's New:** Entries with Change type "Deletion" are present
220
+
221
+
Full rules: [deprecate-retire.md — Retirement workflow](./author-api-docs/deprecate-retire.md#retirement-api-removal) and [Retirement quality checklist](./author-api-docs/deprecate-retire.md#quality-checklist)
222
+
211
223
---
212
224
213
225
## Optional Context-Enhanced Review
@@ -341,6 +353,7 @@ If requested, provide specific edits to fix identified issues.
341
353
342
354
**Special handling:**
343
355
- Mixed scenarios: If both deprecation and other changes exist, flag this for the reviewer
356
+
- Retirement (file deletions): Validate redirect entries, reference cleanup, and dependency safety — see [Retirement review](#retirement-file-deletion-review)
344
357
- Autogenerated content: If file appears autogenerated (check metadata), validate that manual edits are appropriate
345
358
- Permission files: These are typically autogenerated; validate format but don't require extensive review unless issues are evident
0 commit comments