Closed AlexandrSokolov closed 3 months ago
Also experienced this issue today.
Can confirm as well. Problem from dev tools (browser):
Uncaught SyntaxError: Unexpected number
swagger-initializer.js:23 Uncaught ReferenceError: SwaggerUIBundle is not defined
at window.onload (swagger-initializer.js:23:3)
Confirmed working with version 2.16.0. All versions above run into this regression.
Seems to work with a 2.18.0-SNAPSHOT build from 1058944e1d7e33838dc91cd35e3469d00ce00f3d
Thanks y'all. Does anybody have a suggested fix?
I don't think I made any Swagger UI changes in the lastest snapshot, so I'm worried that the issue is still lingering.
Swagger was updated in the latest Snapshot: https://github.com/stoicflame/enunciate/commit/27dfbfc9133384027304df1b79a418f8a075ee4b
So I checked out the revision before the update e5c3c0aaefc034d31018b753595f85e737b7af3f and did a quick build + tested it with our app. This leads to
Uncaught SyntaxError: Unexpected number
swagger-initializer.js:23 Uncaught ReferenceError: SwaggerUIBundle is not defined
at window.onload (swagger-initializer.js:23:3)
Next, I went ahead with the most recent commit https://github.com/stoicflame/enunciate/commit/1058944e1d7e33838dc91cd35e3469d00ce00f3d which includes the swagger ui update (https://github.com/stoicflame/enunciate/commit/27dfbfc9133384027304df1b79a418f8a075ee4b) and the issue is gone. The ui is (at least for our app) working as expected.
Uncaught SyntaxError: Unexpected number (at swagger-ui-bundle.js:2:831005) swagger-initializer.js:23 Uncaught ReferenceError: SwaggerUIBundle is not defined at window.onload (swagger-initializer.js:23:3)
it would be great to have a release with a working swagger-ui again.
would It be possible to provide a config to provide a own swagger-ui zip to manage the version apart from enunciate ?
Yeah it's been awhile. I'll try to put together a new release with the latest fixes and updates.
FYI you actually can configure a "custom" base:
<enucnciate>
<modules>
<swagger base="/path/to/swagger-base.zip"/>
Enunciate 2.18.0 has been released.
Swagger UI 5.17.14 (the latest) is the version integrated into Enunciate 2.18.0.
I've created a demo project: Module Single Module Project
(descrubed in another issue, the custom context root is used)
In pom.xml I configure enunciate version:
With that version when I build and run project as:
mvn clean spring-boot:run
The enunciate docs get generated under http://localhost:8080/custom/context/path/docs/index.htmlSwagger ui is accessible via: http://localhost:8080/custom/context/path/docs/ui/index.html
Trying to update
enunciate.version
to any published versions, inlcuding 2.17.1, causes issues with swagger ui.I cannot open it and in the browser console I get for
swagger-ui-bundle.js:2
:Checked in different browsers, Google Chrome, Chromium, Firefox. The issues exists everywhere.
I tried all the published versions above 2.16.0, only with 2.16.0 it works.