02
02/23
swagger隐藏authentication参数
@Bean public Docket oauthApi() { return new Docket(DocumentationType.SWAGGER_2) .groupName("oauth") .apiInfo(metaData()) .ignoredParameterTypes(Authentication.class) .select() .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.ant("/oauth/**")) .build() .securitySchemes(Collections.singletonList(securitySchema())) .securityContexts(Collections.singletonList(securityContext())); }