Open
Description
The issue can be seen at https://clns.github.io/swagger-ui-bug/.
Q | A |
---|---|
Bug or feature request? | Bug |
Which Swagger/OpenAPI version? | 3.0.1 |
Which Swagger-UI version? | 3.13.2 |
How did you install Swagger-UI? | CDN |
Which browser & version? | Google Chrome Version 65.0.3325.181 (Official Build) (64-bit) |
Which operating system? | Microsoft Windows 10 |
Demonstration API definition
It can also be viewed at https://clns.github.io/swagger-ui-bug/spec.json.
{
"openapi": "3.0.1",
"info": {
"title": "Showcase UI Bugs",
"version": "1.0.0"
},
"paths": {
"/url": {
"post": {
"tags": [
"Tag"
],
"requestBody": {
"description": "Json-encoded object.",
"required": true,
"content": {
"application\/json": {
"schema": {
"type": "string"
}
}
}
},
"responses": {
"200": {
"description": "OK"
}
},
"callbacks": {
"myWebhook": {
"$request.body#/url": {
"post": {
"requestBody": {
"description": "Json-encoded object.",
"required": true,
"content": {
"application\/json": {
"schema": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
Configuration (browser query string, constructor, config.yaml)
window.onload = function () {
const ui = SwaggerUIBundle({
url: 'spec.json',
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
layout: "StandaloneLayout",
docExpansion: 'none',
defaultModelsExpandDepth: 0,
defaultModelRendering: 'example'
})
window.ui = ui
}
Expected Behavior
The callback panel should be expanded on page load, similar to how the endpoint is.
Current Behavior
Nothing gets expanded on page load.