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.prompt.md
+71-1Lines changed: 71 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,6 +260,51 @@ After updating What's new, update the appropriate TOC mapping file to make new d
260
260
- Complex types should NEVER be in the `resources` array
261
261
- API methods are NOT typically added to TOC - they auto-generate from the resource's Methods table
262
262
263
+
### Common Process: Handling Code Snippets in Examples
264
+
265
+
**DO NOT manually add SDK snippets or related artifacts to the Example request section**, including:
266
+
-`# [HTTP](#tab/http)` tab declarations
267
+
- Tab boundary markers (`---`)
268
+
- Language-specific SDK snippet includes (e.g., `[!INCLUDE [sample-code](../includes/snippets/csharp/...)]`)
269
+
- SDK snippet files in the includes folder
270
+
271
+
**Why:** SDK snippets are automatically generated and managed separately via automation.
272
+
273
+
**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.
274
+
275
+
**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.
276
+
277
+
**Example HTTP-only format:**
278
+
279
+
```markdown
280
+
### Request
281
+
282
+
<!-- {
283
+
"blockType": "request",
284
+
"name": "create_user"
285
+
}-->
286
+
287
+
\```msgraph-interactive
288
+
POST https://graph.microsoft.com/v1.0/users
289
+
Content-type: application/json
290
+
291
+
{
292
+
"accountEnabled": true,
293
+
"displayName": "Adele Vance",
294
+
"mailNickname": "AdeleV",
295
+
"userPrincipalName": "AdeleV@contoso.com",
296
+
"passwordProfile": {
297
+
"forceChangePasswordNextSignIn": true,
298
+
"password": "xWwvJ]6NMw+bWH-d"
299
+
}
300
+
}
301
+
\```
302
+
```
303
+
304
+
**When promoting from beta to v1.0:** Remove SDK snippets and tab markers for files copied from beta; keep only HTTP examples (see [Scenario 2](#scenario-2-promote-apis-from-beta-to-v10)).
305
+
306
+
---
307
+
263
308
### Reference Standards: Namespace Qualification
264
309
265
310
Microsoft Graph APIs use namespaces to organize types and operations. Understanding namespace qualification is critical for correct documentation.
@@ -406,6 +451,27 @@ The tooling that generates doc stubs typically assumes **all EntityType resource
406
451
407
452
**Remember:** The presence of a doc stub does NOT mean the operation is supported. Always verify against the API.md file and Documentation Plan.
408
453
454
+
#### Handling missing doc stubs
455
+
456
+
**Important:** If doc stubs are missing for APIs/resources/permissions mentioned in the Documentation Plan or API.md file, DO NOT attempt to regenerate them manually.
457
+
458
+
**What to do:**
459
+
1. Identify which specific files are missing based on the Documentation Plan and API.md
460
+
2. Inform the author about the missing files
461
+
3. Ask the author to provide the missing doc stubs from Graph Studio or the autogeneration process
462
+
4. Wait for the author to add the missing files to `temp-docstubs` before proceeding
463
+
464
+
**Example notification to author:**
465
+
"The Documentation Plan references [resource/API name], but I don't see the corresponding doc stub file in temp-docstubs. Please add the following missing files:
466
+
-[list specific missing file names]"
467
+
468
+
**Do NOT:**
469
+
- Attempt to create doc stub files from scratch
470
+
- Proceed with documentation without the required doc stubs
471
+
- Assume missing files mean the feature should not be documented
472
+
473
+
**Remember:** Doc stubs contain critical autogenerated metadata (permissions, namespace, type references, JSON representations) that should not be manually created.
474
+
409
475
### Supporting updates to consider
410
476
411
477
For all API changes, include the following updates as applicable:
@@ -490,6 +556,7 @@ For each copied file, make the following updates:
490
556
- This include should be deleted for v1.0 GA documentation
491
557
492
558
2.**Remove SDK snippet links** from the Example Request section:
559
+
- See [Common Process: Handling Code Snippets in Examples](#common-process-handling-code-snippets-in-examples) for complete guidance
493
560
- Remove the `# [HTTP](#tab/http)` tab
494
561
- Remove the tab boundary marker (`---`)
495
562
- Remove all language-specific SDK snippet include links (e.g., `[!INCLUDE [sample-code](../includes/snippets/csharp/...)]`)
@@ -1266,7 +1333,8 @@ Before working on any file, apply these rules to both resource and API files:
1266
1333
- Example: An API that returns multiple object types might return an `@odata.type` property for each object to help differentiate each object type in the collection
1267
1334
1268
1335
9.**Examples section:**
1269
-
- Leave this section unchanged
1336
+
- Follow HTTP-only example formatting (see [Common Process: Handling Code Snippets in Examples](#common-process-handling-code-snippets-in-examples))
1337
+
- Do NOT manually add SDK snippet links, tab markers, or language-specific includes
1270
1338
- When adding a new property to a resource, update example request and response bodies for that resource where applicable
1271
1339
1272
1340
### To add new properties to existing resources
@@ -1716,6 +1784,8 @@ Before completing any authoring task, verify:
1716
1784
- [ ] Examples section: Copy examples from API.md and format as applicable
1717
1785
- [ ] Examples section: Request URL matches URL in "HTTP request" block except full URL
1718
1786
- [ ] Examples section: New properties reflected in request/response bodies where applicable
1787
+
- [ ] Examples section: SDK snippets NOT manually added (see [Common Process: Handling Code Snippets in Examples](#common-process-handling-code-snippets-in-examples))
1788
+
- [ ] Examples section: Only HTTP examples included for new files
1719
1789
1720
1790
**For all files (new and updated):**
1721
1791
- [ ] All required sections are present and in correct order
Copy file name to clipboardExpand all lines: api-reference/beta/resources/restrictaccessactionbase.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Use [restrictaccessaction](../resources/restrictaccessaction.md) to explicitly r
22
22
23
23
|Property|Type|Description|
24
24
|:---|:---|:---|
25
-
|action|microsoft.graph.security.dlpAction|The type of DLP action. Inherited from [dlpActionInfo](../resources/dlpactioninfo.md).The possible values are: `notifyUser`, `blockAccess`, `restrictWebGrounding`, `deviceRestriction`, `browserRestriction`, `unknownFutureValue`, `restrictAccess`, `generateAlert`, `generateIncidentReportAction`, `sPBlockAnonymousAccess`, `sPRuntimeAccessControl`, `sPSharingNotifyUser`, `sPSharingGenerateIncidentReport`. Use the `Prefer: include-unknown-enum-members` request header to get the following values from this [evolvable enum](/graph/best-practices-concept#handling-future-members-in-evolvable-enumerations): `restrictAccess`, `generateAlert`, `generateIncidentReportAction`, `sPBlockAnonymousAccess`, `sPRuntimeAccessControl`, `sPSharingNotifyUser`, `sPSharingGenerateIncidentReport`.|
25
+
|action|microsoft.graph.security.dlpAction|The type of DLP action. Inherited from [dlpActionInfo](../resources/dlpactioninfo.md).The possible values are: `notifyUser`, `blockAccess`, `deviceRestriction`, `browserRestriction`, `unknownFutureValue`, `restrictAccess`, `generateAlert`, `generateIncidentReportAction`, `sPBlockAnonymousAccess`, `sPRuntimeAccessControl`, `sPSharingNotifyUser`, `sPSharingGenerateIncidentReport`, `restrictWebGrounding`. Use the `Prefer: include-unknown-enum-members` request header to get the following values from this [evolvable enum](/graph/best-practices-concept#handling-future-members-in-evolvable-enumerations): `restrictAccess`, `generateAlert`, `generateIncidentReportAction`, `sPBlockAnonymousAccess`, `sPRuntimeAccessControl`, `sPSharingNotifyUser`, `sPSharingGenerateIncidentReport`, `restrictWebGrounding`.|
26
26
|restrictionAction|microsoft.graph.security.restrictionAction|Action for the app to take. The possible values are: `warn`, `audit`, `block`.|
0 commit comments