Maximum call stack size exceeded of complicated schemas (FHIR for example)
See original GitHub issueOn large schemas, Swagger UI either fails with RangeError: Maximum call stack size exceeded error or hangs with 100% CPU usage. In my case, these were the official FHIR schemas which may be downloaded by a link: https://www.hl7.org/fhir/fhir.schema.json.zip It would be enough to unzip them and copy the fhir.schema.json folder next to your swagger spec.
| Q | A |
|---|---|
| Bug or feature request? | A bug |
| Which Swagger/OpenAPI version? | dunno |
| Which Swagger-UI version? | 3.13.0-3.13.2 |
| How did you install Swagger-UI? | Either with webjars or downloaded the release zip archive. |
| Which browser & version? | Chrome 65.0.3325.181 (64-bit), FF 57.0.4 (64-bit) |
| Which operating system? | Mac OS 10.11.6 |
Demonstration API definition
{"swagger": "2.0",
"schemes": ["http"],
"info": {"contact": {"email": "test@test.com"},
"title": "sdfsdfsf"},
"paths": {"/foo": {"get": {"description": "sdfsdfsdfdsf",
"responses": {200: {"description": "sdfsdf",
"schema": {"$ref": "./fhir.schema.json/Practitioner.schema.json"}}}
}}}}
Configuration (browser query string, constructor, config.yaml)
I didn’t change enything except the url parameter: url: "/swagger/schema",
Expected Behavior
To see the schemas.
Current Behavior
Either an exception (3.13.0) or an endless 100% CPU usage (3.13.2)
Context
I figured out by crafting a small subset of definitions out of these schemas.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:38 (34 by maintainers)
Top Results From Across the Web
RangeError: Maximum call stack size exceeded
I tried to load in a rather json large schema and I get this error: RangeError: Maximum call stack size exceeded isEmpty [as...
Read more >Azure subscription limits and quotas - Azure Resource Manager
Provides a list of common Azure subscription and service limits, quotas, and constraints. This article includes information on how to ...
Read more >Xml - FHIR v5.0.0-snapshot3
An element that has a maximum cardinality of >1 (e.g. x..* in the definitions) may occur more than once in the instance. In...
Read more >Using open source FHIR APIs with FHIR Works on AWS
The post explained the basic concepts underpinning FHIR, ... these larger objects can quickly exceed limits on timeouts and payload sizes (6 ...
Read more >Schema design best practices | Cloud Bigtable Documentation
For example, in a column family called SysMonitor with column qualifiers of ProcessName ... Bigtable has a limit of 1,000 tables per instance,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Latest version seems to have fixed all the issues I encountered before:
http://petstore.swagger.io/?url=http://swagger-net-test.azurewebsites.net/api/NestedSwag/5 Everything expand significantly faster than before
http://petstore.swagger.io/?url=https://raw.githubusercontent.com/heldersepu/hs-scripts/master/swagger/4411_swagger.json#/default/get_foo The get still takes a few seconds to fully expand but it does expand with no issues
@shockey you can close this issue
thanks as always for making my job easier, @heldersepu!