Skip to content

Commit 31e19e4

Browse files
authored
Merge pull request #3 from dapper91/swagger-ui-fix
- initializer.js embedded into index.html.
2 parents fa4998f + c7086cf commit 31e19e4

File tree

4 files changed

+22
-23
lines changed

4 files changed

+22
-23
lines changed

openapi_ui_bundles/__about__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
__description__ = 'Python static file bundles for OpenAPI UI tools'
33
__url__ = 'https://github.com/dapper91/python-openapi-ui-bundles'
44

5-
__version__ = '0.2.0'
5+
__version__ = '0.2.1'
66

77
__author__ = 'Dmitry Pershin'
88
__email__ = '[email protected]'

openapi_ui_bundles/swagger_ui/vendor/index.html

+17-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@
1414
<div id="swagger-ui"></div>
1515
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
1616
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
17-
<script src="./swagger-initializer.js" charset="UTF-8"> </script>
17+
<script>
18+
window.onload = function() {
19+
window.ui = SwaggerUIBundle({
20+
url: "https://petstore.swagger.io/v2/swagger.json",
21+
dom_id: '#swagger-ui',
22+
deepLinking: true,
23+
presets: [
24+
SwaggerUIBundle.presets.apis,
25+
SwaggerUIStandalonePreset
26+
],
27+
plugins: [
28+
SwaggerUIBundle.plugins.DownloadUrl
29+
],
30+
layout: "StandaloneLayout"
31+
});
32+
};
33+
</script>
1834
</body>
1935
</html>

openapi_ui_bundles/swagger_ui/vendor/swagger-initializer.js

-20
This file was deleted.

setup.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def parse_about():
5151
packages=find_packages(),
5252
install_requires=requirements,
5353
classifiers=[
54-
'Development Status :: 4 - Beta',
54+
'Development Status :: 5 - Production/Stable',
5555
'Intended Audience :: Developers',
5656
'Natural Language :: English',
5757
'License :: OSI Approved :: Apache Software License',
@@ -61,6 +61,9 @@ def parse_about():
6161
'Programming Language :: Python :: 3.7',
6262
'Programming Language :: Python :: 3.8',
6363
'Programming Language :: Python :: 3.9',
64+
'Programming Language :: Python :: 3.10',
65+
'Programming Language :: Python :: 3.11',
66+
'Programming Language :: Python :: 3.12',
6467
],
6568
project_urls={
6669
'Source': 'https://github.com/dapper91/python-openapi_ui_bundles',

0 commit comments

Comments
 (0)