• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AlternateTypeRule类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中springfox.documentation.schema.AlternateTypeRule的典型用法代码示例。如果您正苦于以下问题:Java AlternateTypeRule类的具体用法?Java AlternateTypeRule怎么用?Java AlternateTypeRule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AlternateTypeRule类属于springfox.documentation.schema包,在下文中一共展示了AlternateTypeRule类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: thingsboardApi

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
@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("iotp")
              .apiInfo(apiInfo())
              .alternateTypeRules(
                  new AlternateTypeRule(
                          jsonNodeType,
                          stringType))
              .select()
              .paths(apiPaths())
              .build()
              .securitySchemes(newArrayList(jwtTokenKey()))
              .securityContexts(newArrayList(securityContext()));
}
 
开发者ID:osswangxining,项目名称:iotplatform,代码行数:24,代码来源:SwaggerConfiguration.java


示例2: getDocket

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
/**
 * Gets the docket.
 *
 * @param groupName the group name
 * @param pathPattern the path pattern
 * @param apis the apis
 * @param apiinfo the apiinfo
 * @param tag the tag
 * @return the docket
 */
private Docket getDocket(
    String groupName,
    Predicate<String> pathPattern,
    Predicate<RequestHandler> apis,
    ApiInfo apiinfo,
    Tag tag) {
  return new Docket(DocumentationType.SWAGGER_2)
      .groupName(groupName)
      .select()
      .apis(apis)
      .paths(pathPattern)
      .build()
      .apiInfo(apiinfo)
      .pathMapping("/")
      .directModelSubstitute(LocalDate.class, String.class)
      .genericModelSubstitutes(ResponseEntity.class)
      .alternateTypeRules(
          new AlternateTypeRule(
              typeResolver.resolve(
                  DeferredResult.class,
                  typeResolver.resolve(ResponseEntity.class, WildcardType.class)),
              typeResolver.resolve(WildcardType.class)))
      .useDefaultResponseMessages(false)
      .enableUrlTemplating(false)
      .tags(tag);
}
 
开发者ID:balajeetm,项目名称:json-mystique,代码行数:37,代码来源:SwaggerConfiguration.java


示例3: thingsboardApi

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
@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()));
}
 
开发者ID:thingsboard,项目名称:thingsboard,代码行数:24,代码来源:SwaggerConfiguration.java


示例4: getAlternateTypeRule

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
protected AlternateTypeRule getAlternateTypeRule(Type sourceType, Type sourceGenericType,
        Type sourceSubGenericType, Type targetType, Type targetGenericType) {
    return AlternateTypeRules.newRule(
            typeResolver.resolve(sourceType,
                    typeResolver.resolve(sourceGenericType, sourceSubGenericType)),
            typeResolver.resolve(targetType, targetGenericType));
}
 
开发者ID:bozzo,项目名称:ipplan-api,代码行数:8,代码来源:SwaggerConfig.java


示例5: getMessageRule

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
private AlternateTypeRule getMessageRule(final TypeResolver resolver) {
	return new AlternateTypeRule(resolver.resolve(Message.class), this.getContreteMessageResolvedType(resolver));
}
 
开发者ID:rooting-company,项目名称:roxana,代码行数:4,代码来源:SwaggerAlternateTypeRuleConfig.java


示例6: getListMessageRule

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
private AlternateTypeRule getListMessageRule(final TypeResolver resolver) {
	return new AlternateTypeRule(this.getMessageListResolvedType(resolver), this.getContreteMessageResolvedType(resolver));
}
 
开发者ID:rooting-company,项目名称:roxana,代码行数:4,代码来源:SwaggerAlternateTypeRuleConfig.java


示例7: getArrayListMessageRule

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
private AlternateTypeRule getArrayListMessageRule(final TypeResolver resolver) {
	ResolvedType arrayListMessageResolvedType = resolver.resolveSubtype(this.getMessageListResolvedType(resolver), ArrayList.class);
	return new AlternateTypeRule(arrayListMessageResolvedType, this.getContreteMessageResolvedType(resolver));
}
 
开发者ID:rooting-company,项目名称:roxana,代码行数:5,代码来源:SwaggerAlternateTypeRuleConfig.java


示例8: getLinkedListMessageRule

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
private AlternateTypeRule getLinkedListMessageRule(final TypeResolver resolver) {
	ResolvedType linkedListMessageResolvedType = resolver.resolveSubtype(this.getMessageListResolvedType(resolver), LinkedList.class);
	return new AlternateTypeRule(linkedListMessageResolvedType, this.getContreteMessageResolvedType(resolver));
}
 
开发者ID:rooting-company,项目名称:roxana,代码行数:5,代码来源:SwaggerAlternateTypeRuleConfig.java


示例9: alternativeTypeRules

import springfox.documentation.schema.AlternateTypeRule; //导入依赖的package包/类
/**
 * convert FlakeId and Zone to String in swagger document
 *
 * @see io.kaif.web.support.WebDataBinderAdvice
 * see json deserializer of FlakeId
 * see json deserializer of Zone
 */
private AlternateTypeRule[] alternativeTypeRules() {
  return new AlternateTypeRule[] { AlternateTypeRules.newRule(FlakeId.class, String.class),
      AlternateTypeRules.newRule(Zone.class, String.class) };
}
 
开发者ID:kaif-open,项目名称:kaif,代码行数:12,代码来源:SwaggerConfiguration.java



注:本文中的springfox.documentation.schema.AlternateTypeRule类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IObservableFactory类代码示例发布时间:2022-05-22
下一篇:
Java Output类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap