Open bjarnef opened 2 months ago
It seems to be related to this logic executing here, when TypedSwagger is enabled.
Hi @bjarnef ,
I think the issue you are experiencing is most likely due to https://github.com/swagger-api/swagger-ui/issues/6787, so slightly out of our hands. Either way, when I have the time, I will double check the generated models to make sure we are not generating more than we should. 🙂
Just to confirm, the actual swagger json loads correctly, and only the UI is slow when you try to expand an operation?
Hi @bjarnef I took a look at the swagger ui bundled with Swashbuckle, and it seems to be quite a bit outdated. After updating it, performance was much better, so that might be something we can take a look at.
Would you be able to confirm if doing the following solves your issues?
wwwroot/umbraco/swagger
/dist
to the directory created above (excluding any .html files)Hi @lauraneto
I was only notable when expanding content endpoints, not media. I guess it is related to many content models including element types, where there often only are a few media types/models.
Swagger UI loaded correctly, but expanding the endpoints made the CPU spike.
However it also seems to have an impact on the Delivery API as the it seemed to shutting down on development environment on Umbraco Cloud. After we disabled TypedSwagger
we haven't noticed the same issues.
Which version of the package are you using?
12.0.0
Which Umbraco version are you using? For example: 12.2.0 - don't just write v12
12.3.9
Bug summary
I noticed on a project we have Delivery API extensions package enabled expanding content endpoints under Umbraco Delivery API made the application hanging until the browser failed.
We had this configuration:
after changing
TypedSwagger
withEnabled": false
the Swagger content endpoints expands just fine.Steps to reproduce
Expand any content endpoints under Umbraco Delivery API and notice difference with
TypedSwagger
enabled and disabled.TypedSwagger enabled
TypedSwagger disabled
Expected result / actual result
No response