Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi Profile Support - Part 1 #254

Merged
merged 11 commits into from
Jun 29, 2020
Merged

Multi Profile Support - Part 1 #254

merged 11 commits into from
Jun 29, 2020

Conversation

peombwa
Copy link
Member

@peombwa peombwa commented Jun 9, 2020

This PR is divided into 2 parts, part 1 of this PR closes #72, AB#4769 by proposing the following changes:

  1. Adds tools/GenerateProfiles.ps1 script which will generate profiles definition files from downloaded OpenAPI files.
  2. Updates tools/GenerateModules.ps1 to add supported profiles to a modules manifest (.psd1). This will be used by Get-MgProfile -ListAvailable to get all supported profiles. e.g. Users.User module manifest.
  3. Adds src/Authentication/Authentication/Cmdlets/GetMgProfile.cs and src/Authentication/Authentication/Cmdlets/SelectMgProfile.cs to manage supported Microsoft Graph Profiles.

The profile definitions will be generated, and consumed to generate modules as show below:
image

Profiles in actions

Profiles in action

Part 2 of this PR has the profiles generated by tools/GenerateProfiles.ps1, an updated project structure, and a complete regeneration of all modules using v1.0 & beta OpenAPI docs.

@peombwa peombwa marked this pull request as ready for review June 10, 2020 16:54
@peombwa peombwa self-assigned this Jun 10, 2020
/// </summary>
/// <param name="profileName">The name of a profile.</param>
/// <returns>A full description of a profile.</returns>
internal static string GetProfileDescription(string profileName)
Copy link
Contributor

Choose a reason for hiding this comment

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

consider whether these mapping should just be a json file for maintainability.

Copy link
Member Author

Choose a reason for hiding this comment

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

Moving the mapping to a json fill will result in duplicate descriptions; per cloud per api version. We don't expect the sovreign clouds and API versions to change frequently.

tools/Templates/readme.md Outdated Show resolved Hide resolved
@peombwa peombwa changed the base branch from milestone/0.7.0 to milestone/0.9.0 June 17, 2020 16:05
@peombwa peombwa requested a review from ddyett June 18, 2020 22:14
@peombwa peombwa mentioned this pull request Jun 23, 2020
2 tasks
ddyett
ddyett previously approved these changes Jun 26, 2020
@peombwa peombwa changed the base branch from milestone/0.9.0 to dev June 29, 2020 15:48
@peombwa peombwa dismissed ddyett’s stale review June 29, 2020 15:48

The base branch was changed.

@peombwa peombwa changed the base branch from dev to milestone/0.9.0 June 29, 2020 15:48
@peombwa peombwa changed the base branch from milestone/0.9.0 to dev June 29, 2020 15:48
@peombwa peombwa merged commit 67ed2f6 into dev Jun 29, 2020
@peombwa peombwa deleted the po/multiprofile branch July 17, 2020 22:08
@peombwa peombwa mentioned this pull request Aug 12, 2020
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.

Use AutoREST Profile feature for switching between V1.0 and beta
2 participants