appointer / swaggervel

Swagger for Laravel
70 stars 40 forks source link

Swagger UI with Authorization header as bearer token #9

Closed MohanRaju1 closed 7 years ago

MohanRaju1 commented 7 years ago

Hi,

I have micros services application which is built by spring boot and also integrated with spring oauth2 (client-credentials). Now from post man client i am able to get the token and pass that token as Authorization : bearer token and get results. how can i achieve the same with swagger ui. i am ble to display all my rest endpoints in swagger ui but how can i represent the oauth2 integration. Please help me on this. At present my swagger dockers is like this.

Docket(DocumentationType.SWAGGER_2).select() .apis(RequestHandlerSelectors.basePackage(REST_PACKAGE_PATH)) .paths(PathSelectors.any()) .build().pathMapping("/") .directModelSubstitute(LocalDate.class, String.class) .genericModelSubstitutes(ResponseEntity.class) .alternateTypeRules(newRule(typeResolver.resolve(DeferredResult.class, typeResolver.resolve(ResponseEntity.class, WildcardType.class)), typeResolver.resolve(WildcardType.class))) .useDefaultResponseMessages(false) .apiInfo(getApiInfo());

fgreinus commented 7 years ago

Solved in https://github.com/appointer/swaggervel/releases/tag/v2.1 I guess.