Skip to content

Commit 02ad9b7

Browse files
authored
Merge pull request #28031 from microsoftgraph/main
Merge to publish.
2 parents 356b0a6 + b3c830a commit 02ad9b7

5 files changed

Lines changed: 398 additions & 42 deletions

File tree

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

Lines changed: 298 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ Before beginning the documentation process, first ask the author which documenta
1515
**Please select your documentation scenario:**
1616
1. Author fresh APIs / fresh API changes to beta
1717
2. Promote APIs from beta to v1.0
18+
3. Document deprecated APIs
1819

19-
**Please respond with 1 or 2 to proceed.**
20+
**Please respond with 1, 2, or 3 to proceed.**
2021

2122
Once the author responds, follow the appropriate workflow below.
2223

24+
**Note:** Scenario 3 (deprecation) can be combined with Scenario 1 or 2. If the Summary of API changes includes both deprecation and other changes (new APIs, promotions, updates), the workflow will handle mixed scenarios by processing non-deprecation tasks first, then applying deprecation documentation.
25+
2326
---
2427

2528
## Common Setup and Processes
@@ -76,11 +79,56 @@ After authoring documentation, update the appropriate changelog file in the `cha
7679
}
7780
```
7881

79-
**Step 3: Copy changelog records**
80-
- Copy the ChangeList records from the autogenerated changelog
81-
- Add them to the appropriate changelog file in the `changelog/` folder
82-
- Ensure the WorkloadArea and SubArea match the autogenerated file
83-
- Use "beta" for Version in Scenario 1, "v1.0" for Version in Scenario 2
82+
**Step 3: Copy the complete changelog record**
83+
- **IMPORTANT:** A changelog record is NOT just the ChangeList array. A complete changelog record consists of:
84+
- `ChangeList` array (containing individual change items)
85+
- `Id` (unique GUID for this set of changes)
86+
- `Cloud` (e.g., "Prod")
87+
- `Version` (e.g., "beta" or "v1.0")
88+
- `CreatedDateTime` (ISO-8601 DateTime)
89+
- `WorkloadArea` (e.g., "Security")
90+
- `SubArea` (may be empty string)
91+
92+
- **How to copy the record:**
93+
1. Open the autogenerated changelog file from `temp-docstubs/` (e.g., `changelog_*.json` or `Microsoft.*.json`)
94+
2. Locate the complete record object inside the `"changelog"` array (usually lines 3 to the closing brace of that object)
95+
3. Copy the ENTIRE record object, including:
96+
- Opening brace `{`
97+
- The complete `ChangeList` array with all its items
98+
- All metadata properties (`Id`, `Cloud`, `Version`, `CreatedDateTime`, `WorkloadArea`, `SubArea`)
99+
- Closing brace `}`
100+
4. Open the target changelog file in `changelog/{prefix}.json`
101+
5. Paste the complete record as the FIRST item in the `"changelog"` array (after the opening `[`)
102+
6. Ensure proper JSON formatting with commas between records
103+
104+
- **Example of what to copy (complete record):**
105+
```json
106+
{
107+
"ChangeList": [
108+
{
109+
"Id": "1e2218aa-5dbc-4c74-a0fe-1d06e90b451c",
110+
"ApiChange": "Property",
111+
"ChangedApiName": "newProperty",
112+
"ChangeType": "Addition",
113+
"Description": "Added the **newProperty** property...",
114+
"Target": "resourceName"
115+
}
116+
],
117+
"Id": "1e2218aa-5dbc-4c74-a0fe-1d06e90b451c",
118+
"Cloud": "Prod",
119+
"Version": "beta",
120+
"CreatedDateTime": "2026-01-07T08:37:50.5865153Z",
121+
"WorkloadArea": "Security",
122+
"SubArea": ""
123+
}
124+
```
125+
126+
- **DO NOT:**
127+
- Copy only the ChangeList items and insert them into an existing record
128+
- Modify the Id, CreatedDateTime, or other metadata from the autogenerated file
129+
- Create a new record structure manually
130+
131+
- **Result:** The changelog file should have the new record added at the beginning of the changelog array, with all subsequent records following it
84132

85133
### Common Process: Updating What's New
86134

@@ -230,8 +278,8 @@ For this scenario, the author should add these files to `temp-docstubs`:
230278

231279
### Additional prerequisites
232280
After gathering the inputs, you must also prompt the author to provide:
233-
- **author**: The value to use in the front matter `author` field across all new files
234-
- **ms.subservice**: The value to use in the front matter `ms.subservice` field across all new files
281+
- **author**: Value to replace TODO placeholders in the `author` field (only for new files or where TODO exists)
282+
- **ms.subservice**: Value to replace TODO placeholders in the `ms.subservice` field (only for new files or where TODO exists)
235283

236284
### Critical guidance on doc stubs
237285

@@ -514,6 +562,243 @@ Remove "(preview)" from TOC entries as applicable:
514562

515563
---
516564

565+
## Scenario 3: Document deprecated APIs
566+
567+
### Prerequisites
568+
569+
**See [Common Setup: temp-docstubs Folder](#common-setup-temp-docstubs-folder)** for instructions on setting up the temp-docstubs folder.
570+
571+
For this scenario, the author should add these files to `temp-docstubs`:
572+
- Summary of API changes documenting what is being deprecated
573+
- Autogenerated changelog file (changelog_*.json) if applicable
574+
- Any supporting documentation about the deprecation (blog post URLs, alternative APIs, migration guidance)
575+
576+
### Understanding API deprecation
577+
578+
A feature that is no longer in active development is _deprecated_. Deprecations are announced via blog posts and corresponding documentation updates. The deprecation announcement includes:
579+
- A timeline (deprecation period) after which the feature is removed from the service or the service is retired
580+
- Alternative features or workarounds for existing apps
581+
- Migration guidance and timelines
582+
583+
**Important:** Deprecation is not always a standalone process. An API can be deprecated in the same set of changes that add new APIs. For example:
584+
- Deprecating one property while adding a replacement property
585+
- Deprecating a method while adding a new method
586+
- Deprecating a resource while adding an alternative resource
587+
- Combining deprecation with other API additions or updates
588+
589+
The Summary of API changes may contain a mix of deprecation and new API documentation tasks.
590+
591+
**API artifacts that can be deprecated:**
592+
- Resources (Entity Types and Complex Types)
593+
- Methods (CRUD operations, actions, functions)
594+
- Properties
595+
- Relationships (Navigation Properties)
596+
- Parameters (path, function, or query parameters)
597+
- Enumerations
598+
599+
### Inputs required
600+
601+
**Summary of API changes (required):**
602+
- Detailed description of what is being deprecated, which files to change, alternatives/workarounds, milestone dates, and blog post links
603+
- May include both deprecation and non-deprecation changes (mixed scenarios)
604+
- **Location:** `temp-docstubs` folder
605+
606+
**Autogenerated changelog (optional):**
607+
- JSON file if provided
608+
- **Location:** `temp-docstubs` folder
609+
610+
### Key principles
611+
612+
- **Customer clarity:** Clearly indicate what is deprecated and provide alternatives/workarounds
613+
- **Implicit deprecation:** Deprecating a resource implies all its properties, methods, and relationships are deprecated (no need to mark each individually)
614+
- **Type definitions:** Deprecating a resource does NOT deprecate child type definitions unless explicitly stated
615+
616+
### Common deprecation patterns
617+
618+
**Deprecation banner (applies to resources, methods, enumerations with own topics):**
619+
- Place immediately after namespace declaration (before beta disclaimer if beta)
620+
- Format as CAUTION alert
621+
- Include: what's deprecated, milestone date, alternative/workaround, blog post link
622+
- Use include files stored in `api-reference/includes/` for consistency across topics
623+
624+
**Example:**
625+
```markdown
626+
> [!CAUTION]
627+
> The Outlook tasks API is deprecated and will stop returning data on August 20, 2022. Use the [To Do API](https://learn.microsoft.com/graph/api/resources/todo-overview?view=graph-rest-1.0) instead.
628+
```
629+
630+
**Table updates (applies to properties, relationships, parameters, enum members):**
631+
- Add "(deprecated)" to the name in the first column
632+
- Update description with alternative/workaround
633+
- Move to end of table, grouped alphabetically with other deprecated items
634+
- Do NOT add "(deprecated)" to JSON representation sections (causes validation errors)
635+
636+
**TOC updates:**
637+
- Add `toc.title` attribute in YAML front matter with "(deprecated)" OR
638+
- Include "(deprecated)" inside link text in Methods tables
639+
640+
---
641+
642+
### To deprecate a resource
643+
644+
1. **Update resource topic:**
645+
- Add "(deprecated)" to H1 title: `# user resource type (deprecated)`
646+
- Add deprecation banner (see common pattern above)
647+
- Add `toc.title` with "(deprecated)" to YAML front matter
648+
649+
2. **Mark child methods:**
650+
- Add "(deprecated)" to H1 title in each method topic
651+
- Add deprecation banner to each method topic
652+
653+
3. **Update references in other resources:**
654+
- Add "(deprecated)" to properties/relationships/methods that reference the deprecated resource type
655+
656+
4. **Do NOT mark child type definitions as deprecated** (only if explicitly stated in Summary)
657+
658+
---
659+
660+
### To deprecate a method
661+
662+
1. **Update method topic:**
663+
- Add "(deprecated)" to H1 title: `# Delete user (deprecated)`
664+
- Add deprecation banner with alternative/workaround
665+
666+
2. **Update parent resource Methods table:**
667+
- Add "(deprecated)" inside link text: `[Delete (deprecated)](user-delete.md)`
668+
- Move to end of table (grouped alphabetically with other deprecated methods)
669+
- Include alternative in description column
670+
671+
---
672+
673+
### To deprecate a property
674+
675+
1. **Update resource Properties table:**
676+
- Add "(deprecated)" to property name, update description with alternative, move to end (see common pattern)
677+
678+
2. **Update API method topics:**
679+
- Add "(deprecated)" in Request body tables (POST, PATCH, PUT) if property is used
680+
- Update Response examples: remove property if no longer returned, keep if still returned
681+
682+
---
683+
684+
### To deprecate a relationship
685+
686+
1. **Update resource Relationships table:**
687+
- Add "(deprecated)" to relationship name, update description, move to end (see common pattern)
688+
689+
2. **Deprecate corresponding methods:**
690+
- Methods including the navigation property as a segment are also deprecated
691+
- Follow method deprecation workflow for each affected method
692+
693+
---
694+
695+
### To deprecate a parameter
696+
697+
**Update parameter table in method topic:**
698+
- Add "(deprecated)" to parameter name, specify whether to ignore or use alternative, move to end (see common pattern)
699+
700+
---
701+
702+
### To deprecate an enumeration
703+
704+
1. **Update enumeration definition:**
705+
- **In enums.md or parent resource:** Add "(deprecated)" to section title: `### emailType values (deprecated)`
706+
- **In own topic (rare):** Add "(deprecated)" to H1 title and add deprecation banner
707+
708+
2. **Update properties using the enum:**
709+
- Update type, description, possible values with alternative/workaround
710+
711+
---
712+
713+
### To deprecate enumeration members
714+
715+
1. **Update member table:**
716+
- Add "(deprecated)" to member name, specify alternative, move to end (see common pattern)
717+
718+
2. **Update property descriptions:**
719+
- Note which values are deprecated and provide guidance
720+
721+
---
722+
723+
### Supporting updates
724+
725+
**Changelog:** Change type: "Deprecation". Include API set/entities, link to topics and blog post. See [Common Process: Updating the Changelog](#common-process-updating-the-changelog).
726+
727+
**What's New:** Describe deprecation, link to deprecated API and alternative, link to blog post. See [Common Process: Updating What's New](#common-process-updating-whats-new).
728+
729+
---
730+
731+
### Mixed scenarios
732+
733+
When combining deprecation with new APIs/promotions:
734+
1. Categorize changes (deprecation, new, promotion, updates)
735+
2. Process non-deprecation tasks first (ensures alternatives are documented)
736+
3. Process deprecation tasks, referencing newly created alternatives
737+
4. Update changelog with both deprecation and addition/change entries
738+
739+
---
740+
741+
### Version-specific notes
742+
743+
- **Beta:** Banner after namespace, before beta disclaimer; keep beta disclaimer; use `?view=graph-rest-beta&preserve-view=true`
744+
- **v1.0:** Banner after namespace; no query strings in links
745+
- **Both:** Apply to both versions; may have different milestone dates/alternatives
746+
747+
---
748+
749+
### Quality checklist
750+
751+
**Common to all deprecations:**
752+
- [ ] "(deprecated)" added to H1 titles or table entries as appropriate
753+
- [ ] Deprecation banners added (resources, methods, enums with own topics): CAUTION alert after namespace, includes milestone/alternative/blog link
754+
- [ ] Include files used for banner text (best practice)
755+
- [ ] TOC updated: `toc.title` in YAML or "(deprecated)" in link text
756+
- [ ] Alternatives/workarounds provided and linked
757+
- [ ] "(deprecated)" NOT added to JSON representation sections
758+
759+
**Table entries (properties, relationships, parameters, enum members):**
760+
- [ ] "(deprecated)" added to name in first column
761+
- [ ] Description updated with alternative
762+
- [ ] Moved to end of table (grouped alphabetically with other deprecated items)
763+
764+
**Resources:**
765+
- [ ] All child methods marked deprecated with banners
766+
- [ ] References in other resources marked "(deprecated)"
767+
- [ ] Child type definitions NOT marked deprecated (unless explicitly stated)
768+
769+
**Relationships:**
770+
- [ ] Corresponding methods with navigation property as segment also deprecated
771+
772+
**Properties:**
773+
- [ ] "(deprecated)" added in Request body tables (POST/PATCH/PUT) if applicable
774+
- [ ] Response examples updated (removed if no longer returned, kept if still returned)
775+
- [ ] Description accuracy reviewed (e.g., "required" removed)
776+
777+
**Enumerations:**
778+
- [ ] Section title or H1 title updated
779+
- [ ] Properties using enum updated with alternatives
780+
781+
**Supporting updates:**
782+
- [ ] Changelog: Change type "Deprecation", links to topics/blog
783+
- [ ] What's New: describes deprecation, links to API/alternative/blog
784+
785+
**Mixed scenarios:**
786+
- [ ] Non-deprecation tasks processed first
787+
- [ ] Deprecation references newly created alternatives
788+
- [ ] Changelog includes both deprecation and addition entries
789+
790+
**Version-specific:**
791+
- [ ] Beta: Banner before beta disclaimer; beta disclaimer retained; links include `?view=graph-rest-beta&preserve-view=true`
792+
- [ ] V1.0: No query strings in links
793+
- [ ] Both versions: Applied to both with version-specific formatting
794+
795+
**Final:**
796+
- [ ] All Summary items addressed
797+
- [ ] No markdown lint errors
798+
- [ ] Summary provided to author
799+
800+
---
801+
517802
## Categories of changes (Scenario 1 only)
518803

519804
Based on the summary of API changes, the work will fall into two categories:
@@ -707,9 +992,10 @@ When authoring or updating documentation, ensure compliance with these standards
707992
Before working on any file, apply these rules to both resource and API files:
708993

709994
### Front matter
710-
- **Replace TODO placeholders:**
711-
- Use the `author` value provided by the author
712-
- Use the `ms.subservice` value provided by the author
995+
- **Replace TODO placeholders only:**
996+
- If `author` field has TODO: replace with author-provided value
997+
- If `ms.subservice` field has TODO: replace with author-provided value
998+
- Do NOT update these fields if they already contain values
713999
- **[Optional] Improve the description:**
7141000
- Make it user-friendly and clear
7151001
- Use information from API.md to enhance it
@@ -718,6 +1004,7 @@ Before working on any file, apply these rules to both resource and API files:
7181004
- `ms.date`
7191005
- `doc_type`
7201006
- `ms.localizationpriority`
1007+
- `author` and `ms.subservice` if already populated
7211008

7221009
### File body
7231010
- **H1 title:** Leave unchanged

0 commit comments

Comments
 (0)