Package com.mangofactory.swagger.models.alternates

Examples of com.mangofactory.swagger.models.alternates.AlternateTypeProvider


  protected Collection<? extends Parameter> readParameters(final RequestMappingContext context) {
    HandlerMethod handlerMethod = context.getHandlerMethod();
    SwaggerGlobalSettings swaggerGlobalSettings = (SwaggerGlobalSettings) context.get("swaggerGlobalSettings");
    HandlerMethodResolver handlerMethodResolver
            = new HandlerMethodResolver(swaggerGlobalSettings.getTypeResolver());
    AlternateTypeProvider alternateTypeProvider = swaggerGlobalSettings.getAlternateTypeProvider();

    List<ResolvedMethodParameter> methodParameters = handlerMethodResolver.methodParameters(handlerMethod);
    List<Parameter> parameters = newArrayList();

    List<Command<RequestMappingContext>> commandList = newArrayList();
View Full Code Here


  }

  @Bean(name = "defaultAlternateTypeProvider")
  @Autowired
  public AlternateTypeProvider alternateTypeProvider(TypeResolver typeResolver) {
    AlternateTypeProvider alternateTypeProvider = new AlternateTypeProvider();
    alternateTypeProvider.addRule(newRule(typeResolver.resolve(Map.class), typeResolver.resolve(Object.class)));
    alternateTypeProvider.addRule(newRule(typeResolver.resolve(Map.class, String.class, Object.class),
            typeResolver.resolve(Object.class)));
    alternateTypeProvider.addRule(newRule(typeResolver.resolve(Map.class, Object.class, Object.class),
            typeResolver.resolve(Object.class)));
    alternateTypeProvider.addRule(newRule(typeResolver.resolve(Map.class, String.class, String.class),
            typeResolver.resolve(Object.class)));
    alternateTypeProvider.addRule(newMapRule(WildcardType.class, WildcardType.class));
    return alternateTypeProvider;
  }
View Full Code Here

TOP

Related Classes of com.mangofactory.swagger.models.alternates.AlternateTypeProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.