Open
Description
Q&A (please complete the following information)
- OS: Windows
- Browser: Firefox and Chrome
- Version: 64.0 and 71.0 respectively
- Method of installation: npm
- Swagger-UI version: [email protected]
- Swagger/OpenAPI version: OpenAPI 3.0.0
Content & configuration
Example Swagger/OpenAPI definition:
openapi: "3.0.0"
info:
description: "Something"
version: "1.2.0"
title: "Title"
termsOfService: ""
contact:
email: "[email protected]"
license:
name: "Proprietary"
servers:
- url: 'https://dev-superduperserver.com'
description: Development server
security:
- basicAuth: []
paths:
/apath:
get:
operationId: doAThing
responses:
'200':
content:
application/json:
schema:
oneOf:
- "$ref": "/jsonschemas/somethingThatIsBlank.json"
- "$ref": "/jsonschemas/somethingThatGives404.json"
Swagger-UI configuration options:
import {SwaggerUIBundle, SwaggerUIStandalonePreset} from 'swagger-ui-dist'
import './node_modules/swagger-ui-dist/swagger-ui.css'
const ui = SwaggerUIBundle({
url: "/openapi.yaml",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis
,SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
,validatorUrl: null
})
?yourQueryStringConfig
Describe the bug you're encountering
The interface does not display errors correctly when the server sends an blank response body schema or a 404 for an external schema.
I should note, CORS errors are reported correctly, which is nice.
To reproduce...
Steps to reproduce the behavior:
- Have the server return a 200 with an empty response body to have the spinners spin forever.
- Have the server return a 404 with an empty response body to have an empty schema appear with no errors.
Expected behavior
A 200 with no response body should yield some sort of warning, because the schema should at least be {}
A 404 from the server should yield a big red error somewhere.
Screenshots
When server returns 200 and empty body:
When server returns 404:
Additional context or thoughts
This is a nice bug report template, good work.