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

Ignore method of input parameter from serialized cmdlets #15775

Merged
merged 3 commits into from
Aug 31, 2021
Merged

Conversation

dingmeng-xue
Copy link
Member

@dingmeng-xue dingmeng-xue commented Aug 30, 2021

Description

  • Remove methods and constructors of types of input parameters from serialized json.

    • GetModuleMetadata.psm1 sets -ExcludeMethod when it fetches metadata of type of input parameters.
    • TypeMetadata.cs and ParameterMetadata.cs skip methods and constructors check when type is from input parameters. This offers compatibility that this PR doesn't need to update all cmdlet json files. It still works even if old cmdlet json still contains serialized methods or constructors.
  • Add ModuleName and ModuleVersion to serialized cmdlet json file. The version will be used to track module version. Correspondingly, serializing json file method is moved to VersionBumper.cs because new version value is calculated in that class instead of original VersionMetadataHelper.cs

  • Change Json format setting and add VersionMetadataContractResolver.cs to skip element which is null, empty list or dictionary.

  • corrected Az.BotService.json

  • Removed some unnecessary log

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

@dingmeng-xue dingmeng-xue marked this pull request as ready for review August 30, 2021 15:27
@dingmeng-xue dingmeng-xue added this to the Aug 2021 (2021-09-07) milestone Aug 30, 2021
@wyunchi-ms wyunchi-ms merged commit b483e27 into main Aug 31, 2021
@VeryEarly VeryEarly deleted the dixue/bugfix branch August 31, 2021 04:07
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.

2 participants