Wowza Community

Issues generating API client from Swagger specification with BuyDRMStreamMapsConfig

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).

 "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.

> 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

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

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