Error while creating reference from the swagger(.json) file

Error while creating reference from the swagger(.json) file

book

Article ID: KB0078136

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks 6.x, BWCE

Description

Symptoms:

The following error is thrown while trying to create reference from the swagger file

"REST Schema to XSD Schema conversion error: com.tibco.bw.swagger.model.exceptions.SwaggerError
Invalid object schema.Properties Cannot be null {"type":"object","additionalProperties":{"type":"string"}}" 

Attached error screenshot (xsd_schema_conversion_error.JPG)

Cause:

We do not support additionalProperties or empty object type. That's to say, whenever there's "type":object in the Swagger file, we expect "properties" field to be present with it.

There's an enhancement request AMBW-28424 to throw detailed error listing all the limitations on why a particular swagger to XSD generation fails

Issue/Introduction

Error "XSD Schema conversion error" while creating reference from the swagger(.json) file

Environment

All

Resolution

Workaround:

We expect "properties" field to be present, you can add dummy properties as shown below

E.g.:

CHANGE 


 "templateParameters": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }


TO 

"templateParameters": {
          "type": "object",
           "properties": {
            "dummy": {
          "type": "string"
        }},
          "additionalProperties": {
            "type": "string"
          }          
 

Attachments

Error while creating reference from the swagger(.json) file get_app