jensoleg/swagger-ui

Deeper reference does not work

Opened this issue · 0 comments

Hi guys
I have litte problem with references, which are working fine on swaggerhub editor.

When I do reference somenthing like this:

definitions:

  my_response:
    description: Successful response schema
    properties:
      result:
        type: string
        example: 1
      err_code:
        $ref: "#/definitions/my_error_codes"

it works but when I try to reference to exact property of other definiton like this:

my_response:
   description: Successful response schema
   properties:
     result:
       type: string
       example: 1
     err_code:
       $ref: "#/definitions/my_error_codes/properties/err_code"

I have got error in google chrome browser:

Uncaught TypeError: Cannot read property 'definition' of undefined
    at addReference (operation.js:314)
    at primitiveToHTML (operation.js:334)
    at operation.js:550
    at createHybridWrapper.js:71
    at initCloneByTag.js:18
    at baseForOwn (composeArgs.js:19)
    at initCloneArray.js:12
    at baseMap (createHybridWrapper.js:70)
    at Object.map (baseIndexOf.js:26)
    at processModel (operation.js:527)

Can you fix this?