Skip to content

Errors v2.yml contains duplicate keys #2894

Open
@sneal

Description

@sneal

Issue

errors/v2.yml contains two duplicate keys:

Both of the above are defined twice and with different names and messages in the v2.yml file. The results could vary depending on how the yaml document is unmarshalled.

Context

go-cfclient uses the v2.yml to generate error info

Steps to Reproduce

In go-cfclient attempt to upgrade to gopkg.in/yaml.v3, run make generate

Expected result

The v2.yml document unmarshals fine.

Current result

gen_error.go:49: yaml: unmarshal errors:
  line 221: mapping key "60003" already defined at line 216
  line 1031: mapping key "290013" already defined at line 1021

Possible Fix

Remove the duplicate key keeping only one. Likely for backwards compatibility it would need to be whatever the Ruby yaml parser keeps.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions