-
Notifications
You must be signed in to change notification settings - Fork 263
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
2.0: Swagger UI broken for POST /dcim/cables/, possibly others #3778
Comments
Profiling in the browser shows that the size of the Swagger docs has increased by over an order of magnitude: demo.nautobot.com: 295kB (and that includes a number of installed plugins, default size will be lower still) |
I'm seeing similar schema sizes for demo and next:
$ wc -l *.json
292742 1.2.json
251157 2.0.json
$ sort 1.2.json | uniq -c | sort -n | tail -20
2472 },
2617 "format": "uuid"
2952 "type": "string",
3049 },
3552 "type": "string",
3578 }
3667 ],
4257 "type": "string",
4315 "type": "string"
4723 }
7455 "items": {
7455 "type": "array",
7455 "explode": true,
7455 "style": "form"
9221 "in": "query",
9593 },
9948 "schema": {
10348 }
12735 {
18510 },
$ sort 2.0.json | uniq -c | sort -n | tail -20
1950 "type": "string",
2044 "schema": {
2090 "type": "string",
2268 "type": "string",
2791 }
3508 "type": "string",
3570 ],
3679 }
3900 "type": "string"
4269 }
6235 "style": "form"
6314 "items": {
6314 "type": "array",
6314 "explode": true,
8811 },
9015 }
9063 "in": "query",
9705 "schema": {
12240 {
15751 }, |
Definition of Done: Ensure the Swagger UI loads, can expand different API endpoints, and is not stuck with a spinner like in the screenshot above. No hard line on file size. |
Might want to look at |
It looks like we now have a number of cyclic / infinitely recursive schema definitions. For example,
Looks like the |
Going guess this is a contributing factor to the size of the schema. Or at least, not helping. |
Fixed by #4000 |
Environment
Steps to Reproduce
https://next.demo.nautobot.com/api/docs/
(you must be using the legacy UI or the page fails to load at all; this is probably a separate bug)POST /dcim/cables/
subheading.Expected Behavior
Section to expand and render information about how to POST to this endpoint - this works in
demo.nautobot.com
(1.5.7) by comparison:Observed Behavior
Loading spinner appears indefinitely, eventually the browser may complain about a long-running script and offer to stop it for you:
Maybe related to #3500?
The text was updated successfully, but these errors were encountered: