For now apiKey (or any other authorization method) is lost after browser reload, so I have to provide it again.
Swagger UI provides an out of the box solution to this problem (documentation reference). I will provide code samples for gin-swagger. Similar changes should be introduced for other frameworks.
There is a quick solution for the project.
ginSwagger.Config and ginSwagger.ToSwaggerConfig should accept another parameter
// Config stores ginSwagger configuration variables.
type Config struct {
//The url pointing to API definition (normally swagger.json or swagger.yaml). Default is `doc.json`.
URL string
DeepLinking bool
DocExpansion string
DefaultModelsExpandDepth int
InstanceName string
Title string
PersistAuthorization bool
}
For now apiKey (or any other authorization method) is lost after browser reload, so I have to provide it again.
Swagger UI provides an out of the box solution to this problem (documentation reference). I will provide code samples for
gin-swagger
. Similar changes should be introduced for other frameworks. There is a quick solution for the project.ginSwagger.Config
andginSwagger.ToSwaggerConfig
should accept another parameterSo lib can pass this value to
SwaggerUIBundle
I can provide pull request if you found this feature should be available in your library.