Gen Call Rest Error 'Object reference not set to an instance of an object'
search cancel

Gen Call Rest Error 'Object reference not set to an instance of an object'

book

Article ID: 371075

calendar_today

Updated On:

Products

Gen - Workstation Toolset Gen

Issue/Introduction

In Gen 8.6 Toolset while adding Call Rest statement using 'Upload OpenAPI file'  method ,getting the following error

Object Reference not set to an instance of an object

While uploading OpenAPI specification file with both new and existing model the error occurs

Environment

Release : 8.6

Component: Gen Workstation Toolset

Cause

It is caused by external file references in some of the $ref parameters in the OpenAPI Specification file e.g. lines with unquoted references like:
      parameters:
        - $ref: ./common/parameters.yaml#/CorrelationId
      responses:
        '400':
          $ref: ./common/responses.yaml#/400

      
The Gen parser cannot handle references outside of the single specification file

Resolution

Removing the external references in the OpenAPI specification file resolved the error

Additional Information