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/common.md
+5-14Lines changed: 5 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,17 +45,7 @@ Gather both values in a **single upfront step** to minimize round-trips with the
45
45
46
46
### temp-docstubs Folder
47
47
48
-
Before beginning any documentation process, instruct the author to add all required files to the `temp-docstubs` folder in this workspace:
49
-
50
-
**For Scenario 1 (Fresh APIs / beta changes):**
51
-
- Autogenerated doc stubs (*.md files)
52
-
- API.md file describing the capabilities being added/changed
53
-
- Autogenerated changelog file (changelog_*.json)
54
-
55
-
**For Scenario 2 (Promotion from beta to v1.0):**
56
-
- Documentation Plan documenting what is being promoted
57
-
-**Optional:** Autogenerated doc stubs (*.md files for v1.0)
58
-
- Autogenerated changelog file (changelog_*.json)
48
+
Before beginning any documentation process, instruct the author to add all required files to the `temp-docstubs` folder in this workspace. The specific files needed depend on the scenario — see the **Inputs** section of the relevant scenario file for details.
59
49
60
50
**Important notes about temp-docstubs:**
61
51
- This folder is temporary storage for input files needed during authoring
@@ -259,7 +249,7 @@ After updating What's new, update the appropriate TOC mapping file to make new d
259
249
260
250
**For new files:** Include only HTTP request examples using `msgraph-interactive` (for URLs without an ID placeholder, e.g., `https://graph.microsoft.com/v1.0/users`) or `http` language identifier. No tabs or SDK includes.
261
251
262
-
**For existing files:** Follow the established pattern. If the file has no SDK snippets, add only HTTP examples. Do not introduce SDK snippets to files lacking them.
252
+
**For existing files:** Follow the established pattern. If the file has no SDK snippets, add only HTTP examples. Do not introduce SDK snippets to files or examples lacking them.
263
253
264
254
**Example HTTP-only format:**
265
255
@@ -399,11 +389,12 @@ Fully qualify any type (including enum types) that is defined in a subnamespace
399
389
- Remove beta disclaimer when promoting to v1.0
400
390
401
391
**National cloud include statement:**
402
-
- API method files in beta include an autogenerated national cloud support statement immediately before the `## Permissions` header. Example include statement for all clouds support:
392
+
- API method files in beta include an autogenerated national cloud support statement immediately before the `## Permissions` header. Example:
Copy file name to clipboardExpand all lines: .github/prompts/author-api-docs/deprecate-retire.md
+113Lines changed: 113 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -206,6 +206,106 @@ When combining deprecation with new APIs/promotions:
206
206
207
207
---
208
208
209
+
## Retirement (API removal)
210
+
211
+
Retirement is the final stage of the API lifecycle — the deprecated API has reached its sunset date and is removed from the service. Documentation files for retired APIs must be **deleted** from the repository, with redirects added to guide users to alternatives.
212
+
213
+
**Retirement vs. deprecation:** Deprecation marks an API as "going away in the future" — it adds notices with sunset dates and alternatives. Retirement removes the API entirely — files are deleted, not just annotated.
214
+
215
+
### Inputs for retirement
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.
221
+
222
+
### Retirement workflow
223
+
224
+
#### Step 1: Delete retired files
225
+
226
+
Based on the Documentation Plan, delete:
227
+
228
+
1.**Resource files** for entity types and complex types explicitly marked as retired/deleted:
- Function files: `{entityType}-{functionName}.md`
241
+
242
+
3.**Permission include files** for the retired API operation files:
243
+
-`api-reference/{version}/includes/permissions/{operation}-permissions.md` (naming may vary — match the include reference in each API operation file)
244
+
245
+
4.**Complex type files** explicitly called out as retired/deleted in the Documentation Plan:
246
+
- Only delete if the Documentation Plan explicitly marks the complex type as retired/deleted
247
+
- If not explicitly called out as retired, retain the file
248
+
249
+
5.**Enum files or sections** explicitly called out as retired/deleted in the Documentation Plan:
250
+
- For standalone enum files: delete if explicitly marked as retired
251
+
- For H3 sections in parent resources: removed when parent resource is deleted
252
+
- For entries in global enums files (`enums.md`, `enums-{subnamespace}.md`): remove the enum section
253
+
- If not explicitly called out as retired, retain the file
254
+
255
+
#### Step 2: Clean up references
256
+
257
+
1.**Parent resource references:**
258
+
- Remove the retired resource from Methods tables, Relationships tables, and Properties tables of any parent or related resources that reference it
259
+
260
+
2.**TOC updates:**
261
+
- Remove entries for deleted files from `toc.mapping.json`
262
+
- Remove entries from concept `toc.yml` if applicable
263
+
264
+
3.**Concept topics:**
265
+
- Remove or update references to the retired API in overview and concept documentation
266
+
- If a concept topic is entirely about the retired feature, delete it
267
+
268
+
#### Step 3: Add redirects
269
+
270
+
Add redirects for **resource files that include Methods tables** (entity types) and **API operation files**. Complex types, enums, and permission include files do not need redirects.
271
+
272
+
**Redirect file location:** The repo uses multiple redirect files in the `redirects/` folder at the root, following the pattern `.openpublishing.redirection.yyyy-mm.json`. Use the **latest** redirection file.
-`source_path` — file path to the deleted file in the repo (relative to repo root)
294
+
-`redirect_url` — relative URL to the alternative article on learn.microsoft.com (not a file path)
295
+
-`redirect_document_id` — always `false`
296
+
297
+
**Steps:**
298
+
1. Identify the latest `.openpublishing.redirection.yyyy-mm.json` file in the `redirects/` folder
299
+
2. Add redirect entries for each deleted resource file (entity types with Methods tables) and each deleted API operation file
300
+
3. Set `redirect_url` to the alternative resource or operation specified in the Documentation Plan or the deprecation notice
301
+
302
+
#### Step 4: Add changelog and What's New
303
+
304
+
1.**Changelog:** Add entries with Change type "Deletion". See [Updating the Changelog](common.md#updating-the-changelog).
305
+
2.**What's New:** Note the API retirement, link to the alternative API, and reference the original deprecation blog post. See [Updating What's New](common.md#updating-whats-new).
306
+
307
+
---
308
+
209
309
## Version-specific notes
210
310
211
311
-**Beta:** Banner after namespace, before beta disclaimer; keep beta disclaimer; use `?view=graph-rest-beta&preserve-view=true`
@@ -261,3 +361,16 @@ In addition to the [base quality checklist](common.md#base-quality-checklist), v
261
361
262
362
**Final — Scenario 3 specific:**
263
363
-[ ] All deprecation items from Documentation Plan addressed
364
+
-[ ] All retirement items from Documentation Plan addressed
365
+
366
+
**Retirement-specific (if applicable):**
367
+
-[ ] All resource files explicitly marked as retired/deleted are deleted
368
+
-[ ] All API operation files linked to retired resources are deleted
369
+
-[ ] All permission include files for retired operations are deleted
370
+
-[ ] Complex types and enums only deleted if explicitly called out as retired in the Documentation Plan
371
+
-[ ] References to retired resources removed from parent/related resource tables (Methods, Relationships, Properties)
372
+
-[ ] TOC entries removed for deleted files
373
+
-[ ] Concept topics updated or deleted as appropriate
374
+
-[ ] Redirects added in latest `.openpublishing.redirection.yyyy-mm.json` for deleted resource files (with Methods tables) and API operation files
375
+
-[ ] Changelog entries added with Change type "Deletion"
376
+
-[ ] What's New updated with retirement notice and link to alternative
0 commit comments