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

v1.11.0 regression #236

Closed
lafrech opened this issue Mar 20, 2017 · 2 comments
Closed

v1.11.0 regression #236

lafrech opened this issue Mar 20, 2017 · 2 comments

Comments

@lafrech
Copy link

lafrech commented Mar 20, 2017

I'm getting an error when using v1.11.0. It does not occur with v1.10.2.

TypeError: a is undefined
Stack trace :
u</t.prototype.findDerivedDefinitions@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:7:28589
p</t.prototype.indexSchema@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2257
p</t.prototype.indexSchema@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2174
p</t.prototype.indexSchema/<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2632
p</t.prototype.indexSchema@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2533
p</t.prototype.indexSchema/<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2632
p</t.prototype.indexSchema@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2533
p</t.prototype.indexSchema/<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2632
p</t.prototype.indexSchema@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2533
p</t.prototype.indexSchema@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:2174
p</t.prototype.indexOperationResponses/<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:1658
p</t.prototype.indexOperationResponses@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:1493
p</t.prototype.indexOperation@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:1004
p</t.prototype.indexPaths/</<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:867
p</t.prototype.indexPaths/<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:786
p</t.prototype.indexPaths@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:740
p</t.prototype.indexAll@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:12:31872
s</t.prototype.init@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:17:17409
s</t.prototype.ngOnInit@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:17:18248
C</t.prototype.ngDoCheck@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:31:23074
W</e.prototype.detectChangesInternal@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:29:29224
y</t.prototype.detectChanges@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:7:23267
s</t.prototype.detectChangesInNestedViews@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:7:30847
X</e.prototype.detectChangesInternal@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:30:387
y</t.prototype.detectChanges@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:7:23267
y</t.prototype.internalDetectChanges@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:7:23060
q</e.prototype.detectChangesInternal@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:29:19461
y</t.prototype.detectChanges@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:7:23267
a</t.prototype.detectChanges@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:19:23564
N</e.prototype.tick/<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:12:9732
N</e.prototype.tick@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:12:9693
e/<.next/<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:12:8285
T</T</t.prototype.invoke@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:43:13131
i</t.prototype.forkInnerZoneWithAngularBehavior/this.inner<.onInvoke@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:10:21709
T</T</t.prototype.invoke@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:43:13058
T</E</n.prototype.run@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:43:8849
i</t.prototype.run@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:10:20052
e/<.next@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:12:8262
s</e.prototype.subscribe/i<@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:14:19829
h</e.prototype.__tryOrUnsub@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:23:30217
h</e.prototype.next@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:23:29540
c</e.prototype._next@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:23:28612
c</e.prototype.next@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:23:28295
u</e.prototype.next@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:13:19459
s</e.prototype.emit@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:14:19588
i</t.prototype.checkStable@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:10:21223
i</t.prototype.setHasMicrotask@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:10:22242
i</t.prototype.forkInnerZoneWithAngularBehavior/this.inner<.onHasTask@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:10:21824
T</T</t.prototype.hasTask@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:43:14056
T</T</t.prototype._updateTaskCount@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:43:14383
T</E</n.prototype._updateTaskCount@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:43:10570
T</E</n.prototype.runTask@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:43:9685
o@https://rebilly.github.io/ReDoc/releases/v1.11.0/redoc.min.js:43:4637

Error is at redoc.min.js:43:4524

@RomanHotsiy
Copy link
Member

@lafrech could you provide spec on which it is crashing or at least minimal reproducible sample?

@lafrech
Copy link
Author

lafrech commented Mar 20, 2017

Yeah, sorry. It was a bit hard to extract the relevant part, so I hoped the stack trace would be enough...

I managed to narrow down the issue to this:

{
  "definitions": {
    "Item": {
      "properties": {
        "subitems": {
          "items": {
            "$ref": "#/definitions/SubItem"
          }, 
          "type": "array"
        }
      }, 
      "type": "object"
    }, 
    "SubItem": {
      "discriminator": "kind", 
      "properties": {}, 
      "type": "object", 
    }
  }, 
  "info": {
    "title": "Title", 
    "version": "0.1"
  }, 
  "parameters": {}, 
  "paths": {
    "/items/": {
      "get": {
        "responses": {
          "200": {
            "description": "", 
            "schema": {
              "items": {
                "$ref": "#/definitions/Item"
              }, 
              "type": "array"
            }
          }
        }, 
      }
    }
  }, 
  "swagger": "2.0", 
}

The issue is with the discriminator. That part of the spec is invalid. kind must be a property of SubItem. This is known issue in our API spec generation code.

Hope this helps.

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

No branches or pull requests

2 participants