After every start of Swagger Editor, the javascript api sends out two HTTP requests to
to render the navigation sections Generate server
and Generate clients
.
Because of only internal using, I doesn't need the functions for generating of server and client.
How to disable the requests and the rendering for both navigation sections?
index.html
<script src="./dist/swagger-editor-bundle.js"> </script>
<script src="./dist/swagger-editor-standalone-preset.js"> </script>
<script src="./dist/spec.js"> </script>
<script>
window.onload = function() {
const editor = SwaggerEditorBundle({
spec: spec,
dom_id: '#swagger-editor',
layout: 'StandaloneLayout',
presets: [
SwaggerEditorStandalonePreset
]
})
window.editor = editor
}
</script>
Add swagger2GeneratorUrl: null
and oas3GeneratorUrl: null
to the SwaggerEditorBundle
initialization code:
const editor = SwaggerEditorBundle({
spec: spec,
dom_id: '#swagger-editor',
layout: 'StandaloneLayout',
presets: [
SwaggerEditorStandalonePreset
],
swagger2GeneratorUrl: null, // <-----
oas3GeneratorUrl: null // <-----
})