openapiclientgen icon indicating copy to clipboard operation
openapiclientgen copied to clipboard

Add support for x-enum-values

Open michaelaird opened this issue 5 years ago • 1 comments

Would it be possible to add support for this style of enums:

          "breakerType": {
            "enum": [
              "0",
              "1",
              "2",
              "3"
            ],
            "type": "integer",
            "description": "If populated, this item has a breaker type corresponding to the given value. See DestinyBreakerTypeDefinition for more details.",
            "format": "int32",
            "nullable": true,
            "x-enum-values": [
              {
                "numericValue": "0",
                "identifier": "None"
              },
              {
                "numericValue": "1",
                "identifier": "ShieldPiercing"
              },
              {
                "numericValue": "2",
                "identifier": "Disruption"
              },
              {
                "numericValue": "3",
                "identifier": "Stagger"
              }
            ],
            "x-enum-is-bitmask": false
          },

This is used by the Bungie OpenAPI definition (https://github.com/Bungie-net/api/blob/master/openapi.json)

michaelaird avatar Aug 06 '20 13:08 michaelaird

Likely, as the next stage of development is focused on enum stuffs.

zijianhuang avatar Aug 06 '20 23:08 zijianhuang