Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal Exception when trying to resolve external path reference #203

Closed
Jean-Daniel opened this issue Feb 13, 2017 · 0 comments
Closed

Fatal Exception when trying to resolve external path reference #203

Jean-Daniel opened this issue Feb 13, 2017 · 0 comments

Comments

@Jean-Daniel
Copy link
Contributor

Jean-Daniel commented Feb 13, 2017

I'm not sure why it crash, but when trying to render the attached spec (bug.yml), I have the following exception:

[Error] TypeError: null is not an object (evaluating 'r._pointer=n')
	i (redoc.min.js:48:21834)
	o (redoc.min.js:48:21972)
	promiseReactionJob

Note that this spec render without issue in swagger editor (I didn't try swagger UI though).

I tried to pinpoint the issue and it look likes this is because the 2 paths references contains the same reference to the response array items schema. I didn't get further.

For the record (this files are in the attached zip):

bug.yml

swagger: '2.0'

# This is your document metadata
info:
  version: "2.0.0"
  title: Wonderfull API

host: remote.ws.xooloo.com
basePath: /xooloo/remote/api/v2/
schemes: [https]

# Describe your paths here
paths:
  '/profiles/reports/messages':
    $ref: "bug.common.yml#/paths/Messages"

  '/profiles/reports/phone_calls':
    $ref: "bug.common.yml#/paths/PhoneCalls"

bug.common.yml

# Describe your paths here
paths:
  Messages:
      get:
        summary: Messages Reports
        responses:
          200:
            description: List of SMS report entry.
            schema:
              type: array
              items:
                type: object
                allOf:
                  - $ref: "#/definitions/PhoneReportBase"

  PhoneCalls:
      get:
        summary: Phone Calls Reports
        responses:
          200:
            description: List of phone call report entry
            schema:
              type: array
              items:
                type: object
                allOf:
                  - $ref: "#/definitions/PhoneReportBase"

# -------------------------------------------
# Definitions
# -------------------------------------------
definitions:
  PhoneReportBase:
    type: object
    properties:
      id:
        type: string
        description: canonical phone number.

bug.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants