Skip to content

Commit fec720a

Browse files
authored
Merge branch 'main' into diadabal-ops-ga
2 parents 268f1ac + b9c640d commit fec720a

5,675 files changed

Lines changed: 121702 additions & 8047 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/prompts/author-api-docs.prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
agent: agent
33
model: Claude Sonnet 4.5 (copilot)
4-
tools: ['usages', 'problems', 'fetch', 'githubRepo', 'runCommands', 'edit/createFile', 'edit/editFiles', 'search']
4+
tools: ['usages', 'problems', 'fetch', 'githubRepo', 'runCommands', 'edit/createFile', 'edit/editFiles', 'search', 'github/*']
55
description: Author and update Microsoft Graph API reference documentation using autogenerated doc stubs
66
name: authorAPIdocs
77
---

.github/prompts/author-api-docs/common.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ If a conflict is significant, flag it to the author in the final summary but fol
3131
Gather both values in a **single upfront step** to minimize round-trips with the author:
3232

3333
1. **Attempt auto-detection first:**
34-
- `author`: Use the GitHub login of the signed-in user
34+
- `author`: Use the `get_me` tool to get the GitHub Login of the signed-in user
3535
- `ms.subservice`: Inspect existing API/resource files being updated and use their `ms.subservice` value (exclude enum files)
3636

3737
2. **If either value cannot be inferred**, ask the author for both at once:
@@ -45,17 +45,7 @@ Gather both values in a **single upfront step** to minimize round-trips with the
4545

4646
### temp-docstubs Folder
4747

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.
5949

6050
**Important notes about temp-docstubs:**
6151
- This folder is temporary storage for input files needed during authoring
@@ -86,7 +76,7 @@ After authoring documentation, update the appropriate changelog file in the `cha
8676
// Records will go here
8777
],
8878
"Id": "{unique-guid}",
89-
"Cloud": "prd",
79+
"Cloud": "Prod",
9080
"Version": "beta",
9181
"CreatedDateTime": "{YYYY-MM-DDTHH:mm:ss.fffffffZ}",
9282
"WorkloadArea": "{WorkloadArea}",
@@ -100,7 +90,7 @@ After authoring documentation, update the appropriate changelog file in the `cha
10090
- **IMPORTANT:** A changelog record is NOT just the ChangeList array. A complete changelog record consists of:
10191
- `ChangeList` array (containing individual change items)
10292
- `Id` (unique GUID for this set of changes)
103-
- `Cloud` (always "prd")
93+
- `Cloud` (use "Prod" for new entries; older changelogs may have "prd")
10494
- `Version` (e.g., "beta" or "v1.0")
10595
- `CreatedDateTime` (ISO 8601/RFC 3339 DateTime with fractional seconds and Z suffix)
10696
- `WorkloadArea` (e.g., "Security")
@@ -132,7 +122,7 @@ After authoring documentation, update the appropriate changelog file in the `cha
132122
}
133123
],
134124
"Id": "1e2218aa-5dbc-4c74-a0fe-1d06e90b451c",
135-
"Cloud": "prd",
125+
"Cloud": "Prod",
136126
"Version": "beta",
137127
"CreatedDateTime": "2025-11-17T17:38:10.4694969Z",
138128
"WorkloadArea": "Security",
@@ -179,7 +169,7 @@ Collect the following details for each API change (refer to **templates/changelo
179169

180170
**Required record-level properties:** Version, WorkloadArea, SubArea
181171

182-
**Note:** Cloud is always "prd" - no need to ask the author.
172+
**Note:** Cloud is "Prod" for new entries - no need to ask the author. Older changelogs may use "prd", which is also valid.
183173

184174
**Step 3: Generate GUID and timestamp**
185175

@@ -259,7 +249,7 @@ After updating What's new, update the appropriate TOC mapping file to make new d
259249

260250
**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.
261251

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.
263253

264254
**Example HTTP-only format:**
265255

@@ -399,11 +389,12 @@ Fully qualify any type (including enum types) that is defined in a subnamespace
399389
- Remove beta disclaimer when promoting to v1.0
400390

401391
**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:
403393
```
404394
[!INCLUDE [national-cloud-support](../../includes/all-clouds.md)]
405395
```
406-
- Remove this include statement when promoting to v1.0
396+
- **Do not add** this statement when authoring new API method files — it is added automatically by a downstream process
397+
- **Delete** this statement from files copied from beta when promoting to v1.0
407398

408399
## Documentation Standards
409400

@@ -416,6 +407,7 @@ Fully qualify any type (including enum types) that is defined in a subnamespace
416407
**Permissions:**
417408
- Must start with the standard boilerplate text
418409
- Must include link to a permissions table
410+
- **(Optional) RBAC include:** If the documentation plan or author specifies required Entra admin roles, add an RBAC include statement immediately after the permissions table include. See [RBAC for APIs include file templates](../../../templates/rbac-for-apis-include.md) for file conventions, naming, and content templates.
419411

420412
**HTTP request:**
421413
- Use relative URLs (e.g., `/users` not `https://graph.microsoft.com/beta/users`)
@@ -700,6 +692,7 @@ After processing all files in a documentation session, verify cross-file consist
700692
2. **API file ↔ resource link:** Every API file's description should link back to its parent resource, and that resource file should exist
701693
3. **Enum references ↔ definitions:** Every enum type referenced in Properties tables should be defined in the appropriate enums file, parent resource, or separate topic
702694
4. **Permissions files:** Every permissions include reference in API files should have a corresponding file in the `includes/permissions/` folder
695+
5. **RBAC files:** If any API file has an RBAC include reference, verify the corresponding file exists in `includes/rbac-for-apis/`
703696
5. **JSON representation ↔ Properties table:** Properties listed in the JSON representation section should match the Properties table
704697
6. **Polymorphic collections:** If a Documentation Plan flagged polymorphic types, verify: (a) no operation files were created using derived type names, (b) all shared operation files use the base type name, (c) base type resource page has the Methods table (including base-type-only operations for concrete bases), (d) derived type resource pages have a `## Methods` section with only a polymorphic note (no Methods table — the table lives only on the base type page), (e) `@odata.type` guidance is included in POST/PATCH request body sections
705698

.github/prompts/author-api-docs/deprecate-retire.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,106 @@ When combining deprecation with new APIs/promotions:
206206

207207
---
208208

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:
229+
- `api-reference/{version}/resources/{namespace}-{resourcename}.md`
230+
231+
2. **API operation files** linked to the retired resource:
232+
- List files (GET collection): `{resource}-list-{entityType}.md`
233+
- Get files (GET single): `{entityType}-get.md`
234+
- Create files (POST): `{resource}-post-{entityType}.md`
235+
- PUT files: `{resource}-put-{entityType}.md`
236+
- Update files (PATCH): `{entityType}-update.md`
237+
- Upsert files (PATCH): `{entityType}-upsert.md`
238+
- Delete files (DELETE): `{entityType}-delete.md`
239+
- Action files: `{entityType}-{actionName}.md`
240+
- 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.
273+
274+
**Redirect file format:**
275+
```json
276+
{
277+
"redirections": [
278+
{
279+
"source_path": "api-reference/{version}/resources/{retired-resource}.md",
280+
"redirect_url": "/graph/api/resources/{alternative-resource}",
281+
"redirect_document_id": false
282+
},
283+
{
284+
"source_path": "api-reference/{version}/api/{retired-operation}.md",
285+
"redirect_url": "/graph/api/{alternative-operation}",
286+
"redirect_document_id": false
287+
}
288+
]
289+
}
290+
```
291+
292+
**Field definitions:**
293+
- `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+
209309
## Version-specific notes
210310

211311
- **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
261361

262362
**Final — Scenario 3 specific:**
263363
- [ ] 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

Comments
 (0)