swagger-api / swagger-ui

Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
https://swagger.io
Apache License 2.0
26.41k stars 8.93k forks source link

Display "Server Variable Object" descriptions #8365

Open outdooracorn opened 1 year ago

outdooracorn commented 1 year ago

Content & configuration

Swagger/OpenAPI definition:

{
    "openapi": "3.0.3",
    "info": {
        "title": "Wikibase REST API",
        "version": "0.1",
        "description": "OpenAPI definition of the Wikibase REST API",
        "contact": {...},
        "license": {...}
    },
    "paths": { "$ref": "./resources/index.json" },
    "components": {...},
    "tags": [...],
    "servers": [
        {
            "url": "https://{domain}/w/rest.php/wikibase/v0",
            "variables": {
                "domain": {
                    "default": "wikibase.example",
                    "description": "The domain of the Wikibase instance"
                }
            }
        }
    ]
}

Swagger-UI configuration options:

SwaggerUI( { spec, dom_id: '#swagger' } );

Is your feature request related to a problem?

I'm frustrated when I add a description to an OpenAPI definition and it isn't rendered in the Swagger UI. In particular the "description" field on the Server Variable Object. In the example above this is the string "The domain of the Wikibase instance".

Describe the solution you'd like

I would like the "description" field on the Server Variable Object to be displayed.

Describe alternatives you've considered

Additional context

A very rough example:

image

jotave42 commented 6 months ago

Same here

eelco2k commented 6 months ago

Same here