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

Incorrect property name case of YAML serialized results #114

Closed
BernieWhite opened this issue Mar 26, 2019 · 0 comments
Closed

Incorrect property name case of YAML serialized results #114

BernieWhite opened this issue Mar 26, 2019 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@BernieWhite
Copy link
Member

BernieWhite commented Mar 26, 2019

Description of the issue

Results for Invoke-PSRule with -OutputFormat Yaml should produce results formatted with lower camel case property names.

To Reproduce

Steps to reproduce the issue:

Get-Content docs/scenarios/kubernetes-resources/resources.yaml -Raw | Invoke-PSRule -Path docs/scenarios/kubernetes-resources -Format Yaml -Option docs/scenarios/kubernetes-resources/PSRule.yaml -Outcome Fail -OutputFormat Yaml
- RuleId: kubernetes.Rule.ps1/deployment.HasMinimumReplicas
  RuleName: deployment.HasMinimumReplicas
- RuleId: kubernetes.Rule.ps1/deployment.NotLatestImage
  RuleName: deployment.NotLatestImage
- RuleId: kubernetes.Rule.ps1/deployment.ResourcesSet
  RuleName: deployment.ResourcesSet
- RuleId: kubernetes.Rule.ps1/metadata.Name
  RuleName: metadata.Name
- RuleId: kubernetes.Rule.ps1/metadata.Version
  RuleName: metadata.Version
- RuleId: kubernetes.Rule.ps1/metadata.Component
  RuleName: metadata.Component
- RuleId: kubernetes.Rule.ps1/metadata.Version
  RuleName: metadata.Version

Expected behaviour

Serialized YAML results should use lower camel casing for property names.

Module in use and version:

  • Module: PSRule
  • Version: 0.4.0-B190320

Captured output from $PSVersionTable:

Name                           Value
----                           -----
PSVersion                      5.1.17763.316
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.316
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@BernieWhite BernieWhite added the bug Something isn't working label Mar 26, 2019
@BernieWhite BernieWhite added this to the v0.4.0 milestone Mar 26, 2019
@BernieWhite BernieWhite self-assigned this Mar 26, 2019
BernieWhite added a commit that referenced this issue Mar 27, 2019
 (#117)

- Fix summary is not correctly serialized with JSON or YAML output format #116
- Fix missing properties on serialized YAML output #115
- Fix incorrect property name case of YAML serialized results #114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant