当前位置: 首页>>代码示例>>Java>>正文


Java CookieParameter类代码示例

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


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

示例1: initConverters

import io.swagger.models.parameters.CookieParameter; //导入依赖的package包/类
private static void initConverters() {
  // inner converters
  for (Class<? extends Property> propertyCls : PROPERTY_MAP.keySet()) {
    addInnerConverter(propertyCls);
  }

  converterMap.put(RefProperty.class, new RefPropertyConverter());
  converterMap.put(ArrayProperty.class, new ArrayPropertyConverter());
  converterMap.put(MapProperty.class, new MapPropertyConverter());
  converterMap.put(StringProperty.class, new StringPropertyConverter());
  converterMap.put(ObjectProperty.class, new ObjectPropertyConverter());

  converterMap.put(ModelImpl.class, new ModelImplConverter());
  converterMap.put(RefModel.class, new RefModelConverter());
  converterMap.put(ArrayModel.class, new ArrayModelConverter());

  converterMap.put(BodyParameter.class, new BodyParameterConverter());

  AbstractSerializableParameterConverter converter = new AbstractSerializableParameterConverter();
  converterMap.put(QueryParameter.class, converter);
  converterMap.put(PathParameter.class, converter);
  converterMap.put(HeaderParameter.class, converter);
  converterMap.put(FormParameter.class, converter);
  converterMap.put(CookieParameter.class, converter);
}
 
开发者ID:apache,项目名称:incubator-servicecomb-java-chassis,代码行数:26,代码来源:ConverterMgr.java

示例2: createParameterInstance

import io.swagger.models.parameters.CookieParameter; //导入依赖的package包/类
private static Parameter createParameterInstance(ApiImplicitParam paramAnnotation) {
  switch (paramAnnotation.paramType()) {
    case "path":
      return new PathParameter();
    case "query":
      return new QueryParameter();
    case "body":
      return new BodyParameter();
    case "header":
      return new HeaderParameter();
    case "form":
      return new FormParameter();
    case "cookie":
      return new CookieParameter();
    default:
      throw new Error("not support paramType " + paramAnnotation.paramType());
  }
}
 
开发者ID:apache,项目名称:incubator-servicecomb-java-chassis,代码行数:19,代码来源:AnnotationUtils.java

示例3: testCreate

import io.swagger.models.parameters.CookieParameter; //导入依赖的package包/类
@Test
public void testCreate() {
  ParamValueProcessorCreator creator =
      ParamValueProcessorCreatorManager.INSTANCE.findValue(CookieProcessorCreator.PARAMTYPE);
  CookieParameter p = new CookieParameter();
  p.setName("p1");

  ParamValueProcessor processor = creator.create(p, String.class);

  Assert.assertEquals(CookieProcessor.class, processor.getClass());
}
 
开发者ID:apache,项目名称:incubator-servicecomb-java-chassis,代码行数:12,代码来源:TestCookieProcessorCreator.java

示例4: createParameter

import io.swagger.models.parameters.CookieParameter; //导入依赖的package包/类
@Override
protected CookieParameter createParameter() {
  return new CookieParameter();
}
 
开发者ID:apache,项目名称:incubator-servicecomb-java-chassis,代码行数:5,代码来源:CookieParamAnnotationProcessor.java


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