use of springfox.documentation.schema.AlternateTypeRule in project thingsboard by thingsboard.
the class SwaggerConfiguration method thingsboardApi.
@Bean
public Docket thingsboardApi() {
TypeResolver typeResolver = new TypeResolver();
final ResolvedType jsonNodeType = typeResolver.resolve(JsonNode.class);
final ResolvedType stringType = typeResolver.resolve(String.class);
return new Docket(DocumentationType.SWAGGER_2).groupName("thingsboard").apiInfo(apiInfo()).alternateTypeRules(new AlternateTypeRule(jsonNodeType, stringType)).select().paths(apiPaths()).build().securitySchemes(newArrayList(jwtTokenKey())).securityContexts(newArrayList(securityContext()));
}
Aggregations