|
| 1 | +using System.Collections.Generic; |
| 2 | +using System.Net.Http; |
| 3 | + |
| 4 | +namespace WrapperGenerator; |
| 5 | + |
| 6 | +public static partial class CmdletConfigurator |
| 7 | +{ |
| 8 | + private static readonly List<Entry> CalendarCmdletConfigurations = |
| 9 | + [ |
| 10 | + // The SDK ships no Update cmdlet for /users/{id}/calendar. Its pipeline removes the |
| 11 | + // operation outright, in src/Calendar/Calendar.md: remove-path-by-operation |
| 12 | + // user_UpdateCalendar. The wrapper must not invent a cmdlet the SDK chose to drop. |
| 13 | + new(OverrideKind.SuppressOperation, HttpMethod.Patch, "/users/{}/calendar", Match: PathMatch.Exact, Value: null, |
| 14 | + Reason: "Calendar.md remove-path-by-operation user_UpdateCalendar"), |
| 15 | + |
| 16 | + // GET /users/{id}/calendar ships as Get-MgUserDefaultCalendar, renamed in |
| 17 | + // src/Calendar/Calendar.md: "^(User)(Calendar)$" -> "$1Default$2". |
| 18 | + new(OverrideKind.ReplaceNoun, HttpMethod.Get, "/users/{}/calendar", Match: PathMatch.Exact, Value: "UserDefaultCalendar", |
| 19 | + Reason: "Calendar.md directive renames UserCalendar to UserDefaultCalendar"), |
| 20 | + |
| 21 | + // Calendar: the shipped default-calendar surface. Events under a NAMED calendar and |
| 22 | + // the default-calendar event item tree ship nothing; event items ship from |
| 23 | + // /users/{}/events (Get-MgUserEvent family). |
| 24 | + new(OverrideKind.ReplaceNoun, Method: null, "/users/{}/calendar/events", Match: PathMatch.Exact, Value: "UserDefaultCalendarEvent", |
| 25 | + Reason: "oracle: list/create ship as Get/New-MgUserDefaultCalendarEvent"), |
| 26 | + new(OverrideKind.SuppressOperation, Method: null, "/users/{}/calendar/events/{}", Match: PathMatch.Prefix, Value: null, |
| 27 | + Reason: "oracle: default-calendar event items ship nothing; items ship from /users/{}/events/{}"), |
| 28 | + new(OverrideKind.SuppressOperation, Method: null, "/users/{}/calendars/{}/events/{}", Match: PathMatch.Prefix, Value: null, |
| 29 | + Reason: "oracle: named-calendar event items ship nothing; items ship from /users/{}/events/{}"), |
| 30 | + new(OverrideKind.SuppressOperation, Method: null, "/users/{}/calendars/{}/calendarpermissions", Match: PathMatch.Prefix, Value: null, |
| 31 | + Reason: "oracle: permissions ship only from the default calendar (Get-MgUserCalendarPermission on /users/{}/calendar/calendarPermissions)"), |
| 32 | + ]; |
| 33 | +} |
0 commit comments