1

我配置了一个 oauth 2,它在没有 access_token 的情况下阻止所有 API。我想将具有长期有效性的 access_token 添加到 swagger ui 中,因此来自 swagger 的 api 调用工作正常。我对此进行了谷歌搜索,但没有找到任何最佳解决方案。下面是被告知代码片段。

swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorization("Authorization", "XXXX", "header")); 

但它不起作用。请在上面帮我

4

0 回答 0