# Issues generating API client from Swagger specification with BuyDRMStreamMapsConfig

**URL:** https://community.wowza.com/t/issues-generating-api-client-from-swagger-specification-with-buydrmstreammapsconfig/53839
**Category:** Wowza Developer Dojo
**Tags:** rest-api
**Created:** [August 22, 2019, 12:28pm UTC](https://community.wowza.com/t/issues-generating-api-client-from-swagger-specification-with-buydrmstreammapsconfig/53839 "2019-08-22T12:28:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Markus\_Kelz](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@Markus\_Kelz](https://community.wowza.com/u/Markus_Kelz)
#### Post date: [August 22, 2019, 12:28pm UTC](https://community.wowza.com/t/issues-generating-api-client-from-swagger-specification-with-buydrmstreammapsconfig/53839/1 "2019-08-22T12:28:17Z")

</div>

Hi,

I tried to generate an API client from the Swagger specification published by a Wowza 4.7.7 Streaming Engine instance. The code generation job it self finished.

But the generated output seems to stumble over following type (the property _buyDRMStreamMaps_).

```auto
 "BuyDRMStreamMapsConfig": {
  "id": "BuyDRMStreamMapsConfig",
  "properties": {
    "buyDRMStreamNameMapFile": {
      "type": "string",
      "uniqueItems": false
    },
    "serverName": {
      "type": "string",
      "uniqueItems": false
    },
    "buyDRMStreamMaps": {
      "type": "array",
      "items": {
        "uniqueItems": false,
        "$ref": "BuyDRMStreamMapsConfig$BuyDRMStreamMapConfig"
      },
      "uniqueItems": false
    },
    "saveFieldList": {
      "type": "array",
      "items": {
        "type": "string",
        "uniqueItems": false
      },
      "uniqueItems": false
    },
    "version": {
      "type": "string",
      "uniqueItems": false
    }
  },
  "required": ["version", "serverName", "buyDRMStreamNameMapFile", "buyDRMStreamMaps"],
  "className": "com.wowza.wms.rest.vhosts.applications.drm.BuyDRMStreamMapsConfig"
},

```

It seems that some code generation templates used by (C# and Java with Swagger Codegen 2.2.2) tried to create a class called _BuyDRMStreamMapsConfigBuyDRMStreamMapConfig_ from that.

I tried also a conversion of this Swagger 1.2 specification into OpenAPI 3 one and the conversion failed at the same BuyDRMStreamMapsConfig definition.

```auto
> api-spec-converter --from=swagger_1 --to=openapi_3 --syntax=json --order=alpha http://localhost:8089/v2/servers/BserverNameD/vhosts/BvhostNameD/applications 1>wowza_applications_oapi3.json

Fatal Error: Could not resolve reference #/definitions/BuyDRMStreamMapsConfig$BuyDRMStreamMapConfig
    at throwError (C:\Users\admin\AppData\Roaming\npm\node_modules\api-spec-converter\node_modules\swagger2openapi\index.js:25:15)

```

Spec. converter used: [https://github.com/LucyBot-Inc/api-spec-converter](https://github.com/LucyBot-Inc/api-spec-converter)

Any ideas on how to solve this would be greatly appreciated.

---

<div class="post-metadata">

### Author: ![Rose\_Power-Wowza\_Com](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/rose_power-wowza_com/32/431_2.png) [@Rose\_Power-Wowza\_Com](https://community.wowza.com/u/Rose_Power-Wowza_Com)
#### Post date: [August 23, 2019, 8:13pm UTC](https://community.wowza.com/t/issues-generating-api-client-from-swagger-specification-with-buydrmstreammapsconfig/53839/2 "2019-08-23T20:13:24Z")

</div>

Hi @Markus Kelz, yes, our engineers can help you with this, but they cannot through the forums. You’ll need to submit a support ticket in order for then to properly access and view your complete config/logs.

Thanks!

[https://www.wowza.com/support/open-ticket](https://www.wowza.com/support/open-ticket)
