swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Display "Server Variable Object" descriptions

Open outdooracorn opened this issue 2 years ago • 2 comments

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

outdooracorn avatar Feb 02 '23 14:02 outdooracorn

Same here

jotave42 avatar Mar 11 '24 18:03 jotave42

Same here

eelco2k avatar Mar 22 '24 21:03 eelco2k