Skip to content

feat(wrapper-generator): commit v1.0 wrapper module sources under src… - #3733

Merged
Joywambui-maina merged 4 commits into
powershell-v3from
feat/wrapper-modules-src-layout
Aug 27, 2026
Merged

Joywambui-maina merged 4 commits into
powershell-v3from
feat/wrapper-modules-src-layout

Conversation

@Joywambui-maina

Copy link
Copy Markdown
Contributor

Addresses #3705 — the committable layout under src/{Module}/ and the target-framework decision.

Changes proposed in this pull request

  • Commit the generated Kiota client and wrapper cmdlets for all 35 cmdlet-producing v1.0 modules under src/{Module}/wrapper/{ApiVersion}/, so a clean checkout builds them with only the .NET SDK — kiota is needed to regenerate, never to compile.
  • Nest the API version under wrapper/, not above it. AutoRest owns src/{Module}/{ApiVersion}/and runs withclear-output-folder, so wrapper source placed there is deleted whenever the AutoRest modules regenerate — observed: generating Mail removed its wrapper tree. src/{Module}/` itself is never cleared.
  • Target netstandard2.0 for both projects instead of net10.0. The compatibility contract comes from the module every wrapper references — src/Authentication/Authentication/Microsoft.Graph.Authentication.psd1declaresPowerShellVersion 5.1andCompatiblePSEditions Core, Desktop` — and a manifest binds one un-conditioned dll path, so a single framework must satisfy both editions.
  • Re-include the wrapper tree in .gitignore. Kiota derives directory names from Graph URL paths, so segments like Publish/, Log/ and BackupRestore/ collided with the existing Visual Studio rules and silently dropped 174 real source files.
  • Record kiota-lock.json's spec path relative to its output folder. It was absolute and machine-local, so every clone differed.
  • Stop DirectoryObjects claiming directory.publicKeyInfrastructureRoot. The mapping gave the family to both DirectoryObjects and Identity.DirectoryManagement, emitting 11 identical public cmdlets from two modules; the published-command inventory assigns it to Identity.DirectoryManagement alone.
  • Repoint Test-BodyBindingCoverage.ps1 and Compare-WrapperOperationInventory.ps1 at the committed corpus, and replace the inventory's newest-write-time generator stamp with a SHA-256 over the generator's sources, embedded data and project file.
  • Add docs/WrapperCmdlets-V1.0.csv and -Summary.csv as the reviewable inventory.

How to review this

34,443 files, 34,427 of them generated. Read docs/WrapperCmdlets-V1.0.csv, not the tree — one row per emitted cmdlet with its module, verb, noun and request path, plus per-module totals in the summary. The 16 hand-written files are the whole reviewable surface: .gitignore, config/ModulesMapping.jsonc, the two openApiDocs* re-slices, six scripts, two
csproj templates, Program.cs, and two docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@Joywambui-maina
Joywambui-maina force-pushed the feat/wrapper-modules-src-layout branch from c1e051b to c450ffc Compare August 21, 2026 03:57
@Joywambui-maina
Joywambui-maina changed the base branch from feat/bind-request-body-properties to feat/wrapper-operation-shapes August 21, 2026 03:57
@peombwa

Copy link
Copy Markdown
Member

The GitOps/AdvancedSecurity check is failing because Microsoft.Kiota.Bundle 2.0.0 transitively pulls in System.Text.Json v8.0.0, which is affected by two high-severity Denial of Service vulnerabilities:

To fix this, add an explicit PackageReference pinning System.Text.Json to 10.0.3 in each affected wrapper Client.csproj, the same way it's already pinned in [Authentication.Core.csproj (line 30):

<PackageReference Include="System.Text.Json" Version="10.0.3" />

<PackageReference Include="System.Text.Json" Version="10.0.3" />

@Joywambui-maina

Copy link
Copy Markdown
Contributor Author

Done in f7b83ce - thanks, and 10.0.3 was the right call over what I was about to use.

Pinned System.Text.Json to 10.0.3 in tools/Templates/WrapperClient.csproj.template and in all 38 committed Client.csproj, matching the pin in Authentication.Core.csproj so the repository keeps one answer rather than two.

I had been about to pin 8.0.5, which is the minimum version that patches both advisories (CVE-2024-30105 is fixed in 8.0.4, CVE-2024-43485 in 8.0.5, so 8.0.4 alone is still vulnerable). That would have worked but diverged from the existing convention for no reason.

Verified rather than assumed, since the client projects are netstandard2.0:

  • a netstandard2.0 restore with Microsoft.Kiota.Bundle 2.0.0 plus the pin resolves System.Text.Json/10.0.3; without it, 8.0.0
  • Authentication.Core targets netstandard2.0;net6.0;net472, so 10.0.3 was already proven on that framework here
  • Mail rebuilds clean with the pin

Diff is 39 files, +117/-0 - the template and the csprojs only, no generated output.

Base automatically changed from feat/wrapper-operation-shapes to powershell-v3 August 26, 2026 23:25
…e}/wrapper

All 38 modules' Kiota clients and generated cmdlets are committed - 11,719
cmdlet files, 9,051 public names - so a clean checkout builds with only the
.NET SDK. The API version nests under wrapper/ because AutoRest clears
src/{Module}/{version} on regeneration; both projects target netstandard2.0
so one dll path serves Core and Desktop. DirectoryObjects no longer
double-declares publicKeyInfrastructure. Gates and docs re-measured against
this corpus: parity 9,548 of 10,385 joinable, omission oracle 0 failures.
…cation binding

Manifests now declare RequiredModules on Microsoft.Graph.Authentication (minimum
read from its csproj) and packages no longer embed the Authentication assemblies:
a module-local copy at a different version splits the GraphSession static under
Windows PowerShell's loader, reporting NoGraphSession while connected.
ModuleVersion now equals the package version - the hard-coded placeholder made
every versioned-folder install refuse to import. Proven by marker-client probes;
package gate passes.
…nsitive

Microsoft.Kiota.Bundle 2.0.0 pulls System.Text.Json 8.0.0 transitively, which
carries CVE-2024-30105 and CVE-2024-43485 - both high-severity denial of
service - and Dependency Review fails the build on it. Pins 10.0.3 explicitly
in the client template and in all 38 committed Client.csproj, the version
Authentication.Core already pins, so the repository keeps one answer.

Verified: a netstandard2.0 restore with Kiota 2.0.0 resolves 10.0.3 rather
than 8.0.0, and Mail rebuilds clean.
@Joywambui-maina
Joywambui-maina force-pushed the feat/wrapper-modules-src-layout branch from 891013d to 40ac65f Compare August 26, 2026 23:30
Comment thread config/ModulesMapping.jsonc
@Joywambui-maina
Joywambui-maina enabled auto-merge (squash) August 27, 2026 18:22
@Joywambui-maina
Joywambui-maina merged commit fbe459b into powershell-v3 Aug 27, 2026
4 checks passed
@Joywambui-maina
Joywambui-maina deleted the feat/wrapper-modules-src-layout branch August 27, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants