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
+241-1Lines changed: 241 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,11 +15,14 @@ Before beginning the documentation process, first ask the author which documenta
15
15
**Please select your documentation scenario:**
16
16
1. Author fresh APIs / fresh API changes to beta
17
17
2. Promote APIs from beta to v1.0
18
+
3. Document deprecated APIs
18
19
19
-
**Please respond with 1or 2 to proceed.**
20
+
**Please respond with 1, 2, or 3 to proceed.**
20
21
21
22
Once the author responds, follow the appropriate workflow below.
22
23
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
+
23
26
---
24
27
25
28
## Common Setup and Processes
@@ -514,6 +517,243 @@ Remove "(preview)" from TOC entries as applicable:
514
517
515
518
---
516
519
520
+
## Scenario 3: Document deprecated APIs
521
+
522
+
### Prerequisites
523
+
524
+
**See [Common Setup: temp-docstubs Folder](#common-setup-temp-docstubs-folder)** for instructions on setting up the temp-docstubs folder.
525
+
526
+
For this scenario, the author should add these files to `temp-docstubs`:
527
+
- Summary of API changes documenting what is being deprecated
528
+
- Autogenerated changelog file (changelog_*.json) if applicable
529
+
- Any supporting documentation about the deprecation (blog post URLs, alternative APIs, migration guidance)
530
+
531
+
### Understanding API deprecation
532
+
533
+
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:
534
+
- A timeline (deprecation period) after which the feature is removed from the service or the service is retired
535
+
- Alternative features or workarounds for existing apps
536
+
- Migration guidance and timelines
537
+
538
+
**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:
539
+
- Deprecating one property while adding a replacement property
540
+
- Deprecating a method while adding a new method
541
+
- Deprecating a resource while adding an alternative resource
542
+
- Combining deprecation with other API additions or updates
543
+
544
+
The Summary of API changes may contain a mix of deprecation and new API documentation tasks.
545
+
546
+
**API artifacts that can be deprecated:**
547
+
- Resources (Entity Types and Complex Types)
548
+
- Methods (CRUD operations, actions, functions)
549
+
- Properties
550
+
- Relationships (Navigation Properties)
551
+
- Parameters (path, function, or query parameters)
552
+
- Enumerations
553
+
554
+
### Inputs required
555
+
556
+
**Summary of API changes (required):**
557
+
- Detailed description of what is being deprecated, which files to change, alternatives/workarounds, milestone dates, and blog post links
558
+
- May include both deprecation and non-deprecation changes (mixed scenarios)
559
+
-**Location:**`temp-docstubs` folder
560
+
561
+
**Autogenerated changelog (optional):**
562
+
- JSON file if provided
563
+
-**Location:**`temp-docstubs` folder
564
+
565
+
### Key principles
566
+
567
+
-**Customer clarity:** Clearly indicate what is deprecated and provide alternatives/workarounds
568
+
-**Implicit deprecation:** Deprecating a resource implies all its properties, methods, and relationships are deprecated (no need to mark each individually)
569
+
-**Type definitions:** Deprecating a resource does NOT deprecate child type definitions unless explicitly stated
570
+
571
+
### Common deprecation patterns
572
+
573
+
**Deprecation banner (applies to resources, methods, enumerations with own topics):**
574
+
- Place immediately after namespace declaration (before beta disclaimer if beta)
575
+
- Format as CAUTION alert
576
+
- Include: what's deprecated, milestone date, alternative/workaround, blog post link
577
+
- Use include files stored in `api-reference/includes/` for consistency across topics
578
+
579
+
**Example:**
580
+
```markdown
581
+
> [!CAUTION]
582
+
> 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.
583
+
```
584
+
585
+
**Table updates (applies to properties, relationships, parameters, enum members):**
586
+
- Add "(deprecated)" to the name in the first column
587
+
- Update description with alternative/workaround
588
+
- Move to end of table, grouped alphabetically with other deprecated items
589
+
- Do NOT add "(deprecated)" to JSON representation sections (causes validation errors)
590
+
591
+
**TOC updates:**
592
+
- Add `toc.title` attribute in YAML front matter with "(deprecated)" OR
593
+
- Include "(deprecated)" inside link text in Methods tables
594
+
595
+
---
596
+
597
+
### To deprecate a resource
598
+
599
+
1.**Update resource topic:**
600
+
- Add "(deprecated)" to H1 title: `# user resource type (deprecated)`
601
+
- Add deprecation banner (see common pattern above)
602
+
- Add `toc.title` with "(deprecated)" to YAML front matter
603
+
604
+
2.**Mark child methods:**
605
+
- Add "(deprecated)" to H1 title in each method topic
606
+
- Add deprecation banner to each method topic
607
+
608
+
3.**Update references in other resources:**
609
+
- Add "(deprecated)" to properties/relationships/methods that reference the deprecated resource type
610
+
611
+
4.**Do NOT mark child type definitions as deprecated** (only if explicitly stated in Summary)
612
+
613
+
---
614
+
615
+
### To deprecate a method
616
+
617
+
1.**Update method topic:**
618
+
- Add "(deprecated)" to H1 title: `# Delete user (deprecated)`
619
+
- Add deprecation banner with alternative/workaround
620
+
621
+
2.**Update parent resource Methods table:**
622
+
- Add "(deprecated)" inside link text: `[Delete (deprecated)](user-delete.md)`
623
+
- Move to end of table (grouped alphabetically with other deprecated methods)
624
+
- Include alternative in description column
625
+
626
+
---
627
+
628
+
### To deprecate a property
629
+
630
+
1.**Update resource Properties table:**
631
+
- Add "(deprecated)" to property name, update description with alternative, move to end (see common pattern)
632
+
633
+
2.**Update API method topics:**
634
+
- Add "(deprecated)" in Request body tables (POST, PATCH, PUT) if property is used
635
+
- Update Response examples: remove property if no longer returned, keep if still returned
636
+
637
+
---
638
+
639
+
### To deprecate a relationship
640
+
641
+
1.**Update resource Relationships table:**
642
+
- Add "(deprecated)" to relationship name, update description, move to end (see common pattern)
643
+
644
+
2.**Deprecate corresponding methods:**
645
+
- Methods including the navigation property as a segment are also deprecated
646
+
- Follow method deprecation workflow for each affected method
647
+
648
+
---
649
+
650
+
### To deprecate a parameter
651
+
652
+
**Update parameter table in method topic:**
653
+
- Add "(deprecated)" to parameter name, specify whether to ignore or use alternative, move to end (see common pattern)
654
+
655
+
---
656
+
657
+
### To deprecate an enumeration
658
+
659
+
1.**Update enumeration definition:**
660
+
-**In enums.md or parent resource:** Add "(deprecated)" to section title: `### emailType values (deprecated)`
661
+
-**In own topic (rare):** Add "(deprecated)" to H1 title and add deprecation banner
662
+
663
+
2.**Update properties using the enum:**
664
+
- Update type, description, possible values with alternative/workaround
665
+
666
+
---
667
+
668
+
### To deprecate enumeration members
669
+
670
+
1.**Update member table:**
671
+
- Add "(deprecated)" to member name, specify alternative, move to end (see common pattern)
672
+
673
+
2.**Update property descriptions:**
674
+
- Note which values are deprecated and provide guidance
675
+
676
+
---
677
+
678
+
### Supporting updates
679
+
680
+
**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).
681
+
682
+
**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).
683
+
684
+
---
685
+
686
+
### Mixed scenarios
687
+
688
+
When combining deprecation with new APIs/promotions:
0 commit comments