We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
srpingboot 3.2.5 springdoc 2.6.0
like swagger2
private List<SecurityScheme> securitySchemes() { List<SecurityScheme> schemeList = new ArrayList<>(); schemeList.add(new ApiKey(Common.MVC_HEADER_TOKEN, Common.MVC_HEADER_TOKEN, "header")); return schemeList; }
The text was updated successfully, but these errors were encountered:
The document is not very clear, this is work fine
@Bean public OpenAPI springDocOpenAPI() { OpenAPI api = new OpenAPI(); api.components(new Components().addSecuritySchemes("x-token", new SecurityScheme() .type(SecurityScheme.Type.APIKEY) .in(SecurityScheme.In.HEADER) .name("x-token") .description("用户Token"))); api.info(new Info() .title("Service APIs.") .description("系统业务接口服务") .version("3.0.0") ); api.addSecurityItem(new SecurityRequirement().addList("x-token")); return api; }
Sorry, something went wrong.
No branches or pull requests
srpingboot 3.2.5
springdoc 2.6.0
like swagger2
The text was updated successfully, but these errors were encountered: