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

[openapi spec] titlesByGender object keys are wrong #1573

Open
nev-r opened this issue Jan 2, 2022 · 3 comments
Open

[openapi spec] titlesByGender object keys are wrong #1573

nev-r opened this issue Jan 2, 2022 · 3 comments
Labels
bug filed A bug has been filed in BNet's internal bug tracking system for this request/report. bug docs

Comments

@nev-r
Copy link

nev-r commented Jan 2, 2022

spec claims the titlesByGender dictionary is keyed by the DestinyGender enum

"Destiny.Definitions.Records.DestinyRecordTitleBlock": {
  "type": "object",
  "properties": {
    "hasTitle": {
      "type": "boolean"
    },
    "titlesByGender": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "x-dictionary-key": {
        "type": "integer",
        "format": "int32",
        "x-enum-reference": {
          "$ref": "#/components/schemas/Destiny.DestinyGender"
        },
        "x-enum-is-bitmask": false
      }
    },

but it's actually keyed by two string keys named Male and Female

@jshaffstall-bng jshaffstall-bng added bug bug filed A bug has been filed in BNet's internal bug tracking system for this request/report. docs labels Jan 3, 2022
@jshaffstall-bng
Copy link
Member

Looks like the JSON serialization turns the enum value key into the enum name instead of the int32 value.

would a change to the API spec and docs make the most sense here? Filed as TFS 1055852.

@nev-r
Copy link
Author

nev-r commented Jan 3, 2022

a spec/doc change feels kindest for existing consumers of the data,
and if it were keyed by DestinyGender, it would need 3 values, one for 2 (Unknown)

@jshaffstall-bng
Copy link
Member

We don't have titles for that value, and in this case we don't need the map to be exhaustive for the enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug filed A bug has been filed in BNet's internal bug tracking system for this request/report. bug docs
Projects
None yet
Development

No branches or pull requests

2 participants