Orange-OpenSource / angular-swagger-ui

An angularJS implementation of Swagger UI
http://orange-opensource.github.io/angular-swagger-ui/
MIT License
135 stars 74 forks source link

Failing to parse large/complex swagger.json #77

Open peterberkman opened 7 years ago

peterberkman commented 7 years ago

I'm working with HL7 FHIR and, admittedly, their structures are HUGE and complex.

the error I'm getting from the error handler is:

error:  Failed to parse Swagger specification: Invalid string length

I tried to track it down, but the closest source I could get to is the parser.

attached is the json. I'd really appreciate if you could tell me what's going on. I'm a bit lost.

THANK YOU! swagger.zip

mathieuales commented 7 years ago

unable to generate the json sample of #/definitions/CapabilityStatement, object seems too big RangeError: Invalid string length at JSON.stringify (<anonymous>)

mathieuales commented 7 years ago

partially fixed in version 0.4.4: avoid stopping model generation when issue occurs TODO: find a way to completely fix the issue

peterberkman commented 7 years ago

Mathieuales, great news! However, we have been using the 0.3.5 version. When I try to change to 0.4.4, I get this weird LRU type error "key must be a string or number....' I think we may be on an earlier version of AngularJS? Have you run into this with your 0.4 revs?

mathieuales commented 7 years ago

@peterberkman which AngularJS version are you using ?

peterberkman commented 7 years ago

We're stuck on 1.3 for a while. I looked in the source and you're up to 1.5 now. I'll manually patch it or something. Thanks very much for all your work and help with this!!!

gerbil commented 7 years ago

http://errors.angularjs.org/1.6.5/$parse/syntax?p0=%3A&p1=is%20an%20unexpected%20token&p2=5&p3=http%3A%2F%2Fpetstore.swagger.io%2Fv2%2Fswagger.json&p4=%3A%2F%2Fpetstore.swagger.io%2Fv2%2Fswagger.json

mathieuales commented 7 years ago

@gerbil What is your question ? Why are you adding this to this issue ? Which version of angular-swagger-ui are you using ? Without context of use and detailed explanation I can't do anything for you